Questions tagged [systemtime]

In computer science and computer programming, system time represents a computer system's notion of the passing of time.

171 questions
1
vote
1 answer

Estimate the Expected Run Time of a loop or nested loops

I am using the R programming language. I am interested in knowing if there is a way to estimate the actual run time of a procedure (relative to the "strength" of your computer) without actually running that procedure. For example, suppose I want to…
stats_noob
  • 5,401
  • 4
  • 27
  • 83
1
vote
3 answers

Why does my SystemTimeToFileTime return a result which is off by 5 hours?

It would make sense if I was in a ±5 hour timezone, but I'm in GMT -06:00, so I'm not sure if timezones are my problem or if it's something else. Here is my code I'm using: Private Sub SetFileTimes(file As String, Optional creationTime As Date,…
dlras2
  • 8,416
  • 7
  • 51
  • 90
1
vote
1 answer

How does UTC work with Javascript and computers with wrong times?

I have been writing some JavaScript code that relies upon universal time. I have been doing this online with two computers. One of which is 24 minutes behind the other. Example: Computer 1: 25/07/2020, 21:57 Computer 2: 25/07/2020, 22:21 When…
Anralore
  • 103
  • 1
  • 9
1
vote
1 answer

Is there a way to modify SystemTime in rust?

I need to modify a SystemTime and set it to the current minute without the seconds but I can't find any methods or documentation on how to do this. I am currently using SystemTime::now(). What I am looking for is some way to set the seconds to zero.…
Marcus Ruddick
  • 9,795
  • 7
  • 28
  • 43
1
vote
1 answer

Why system time larger than real time?

It is a program that calculates the number of divisors of 10000 as the maximum number of threads created by 1000. I thought realtime was larger and turned. n_Threads is 1000 thread.c struct tms mytms; clock_t t1, t2; if( (t1 = times( &mytms…
gowoo
  • 11
  • 3
1
vote
1 answer

How do I use system time as a trigger in codesys ladder?

Programming a raspberry pi with codesys, using mostly ladder, basically I need to write all data that is currently in a couple arrays to a csv file at midnight, so i'd like to be able to use a dt value as a trigger. I can't figure out how to use…
SBatesAES
  • 13
  • 6
1
vote
1 answer

Possible problem of gcc with sleep_for and sleep_until functions

gcc seems to have a problem with sleep_for and sleep_until functions (of namespace std::this_thread). I do some simple example with future and conditional variables. gcc actually uses the System Clock instead of Monotonic Clock and this can cause…
Zig Razor
  • 3,381
  • 2
  • 15
  • 35
1
vote
1 answer

Convert Current Date Time to Romania Time with Day Light Saving

I need some sample to convert current system date time to Romania Time Zone EET with day light saving. Can any one please help me on this?
Mysti
  • 105
  • 3
  • 10
1
vote
2 answers

How to maintain user login session?

I am trying to maintain user login session(1 hr) in my Android application. When user logs in, I am receiving login time(StartTime) and session end time(Timemout) from server. I am comparing received login time + session end time with my current…
1
vote
0 answers

How to identify the system time is set to 12hrs or 24hrs in javascript

When I do "new date()" in javascript it gives the time in 24hrs. I want to know whether the user has set the system time to 12hrs or 24hours in javascript. Is there any way to detect this in javascript?
Amit
  • 41
  • 2
  • 9
1
vote
2 answers

getting the local system date time and converting it to a string (MFC C++)

I have inherited some MFC C++ code (it's an ActiveX OCX control running on a Windows Mobile 6.5 device) and I need to acquire the system date and time and append it as part of an existing string which gets passed via the com port to another…
C Williams
  • 11
  • 1
  • 2
1
vote
1 answer

Syncronize time wint NTP-servers without admin rights

I wrote an application, that grab time from NTP server and change system time of my machine. It works good, but time synchronizing only if my apps start with admin rights. So a question is how to launch it without admin privileges, but to save it…
Ivan Kozlov
  • 255
  • 3
  • 13
1
vote
2 answers

Debugging timeouts in IntelliJ IDEA

In my application I'm using timeouts to exit out of certain endless loops if it is uncertain if the condition will be met in reasonable time. For the timekeeping I'm using the system's time since it's straightforward: public class BenchmarkTimer { …
BullyWiiPlaza
  • 17,329
  • 10
  • 113
  • 185
1
vote
1 answer

Time since the code has been running

The following code shows total code run time: Dummy code; require(tictoc) require(svMisc) tic() y<-NA for(i in 1:1000000){ progress(i) x<-sample(rnorm(1000),1) y[i]<- sqrt(x) } max(y, na.rm = T) toc() I want to see the running time…
Polar Bear
  • 731
  • 1
  • 7
  • 21
1
vote
1 answer

update date/time in oracle database from java

I have 2 columns in my table with data type TIMESTAMP and DATE. The column with data type "DATE" is default date/time, so that we don't need to insert from JAVA, It automatically gets inserted. For the other column with data type "TIMESTAMP" I…
Kishor kumar R
  • 195
  • 2
  • 17