Questions tagged [systemtime]

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

171 questions
3
votes
2 answers

how to Generate a random number in CMD that is not based on system clock

I want to create a random number in a batch file, that is not based on the system clock time. I have been trying to use %RANDOM% but its not working well for my needs. The reason is that I want to write file names that I'm recieving in muliple…
David Gidony
  • 1,243
  • 3
  • 16
  • 31
3
votes
2 answers

Accurate System time

What is the best way to get the most accurate system time (hours minutes and seconds) correct upto milliseconds in java. I have been looking into Clock, Date and Calendar objects. I want to be able to timestamp a packet with the most accurate System…
Krish
  • 159
  • 3
  • 14
3
votes
1 answer

Is there a function like asctime_s() that works for SYSTEMTIME structures in windows?

I know I can do this if I have a struct tm structure, but what if I want to do the same thing with a SYSTEMTIME. I could do this manually but just wondering if there's function that does this already. Thanks void PrintTimeSCII(struct tm *time) { …
emge
  • 477
  • 2
  • 8
  • 20
3
votes
0 answers

Date() changing the system time

If i run the following code in google Chrome (Version 40.0.2214.111 m) the system clock accelerates and the system clock goes approx 1-2 second faster every 10 seconds. I have tested this on a machine running windows 7 64-bit, with intel Atom D525 …
Bilen
  • 65
  • 8
3
votes
3 answers

How to check Use network-provided values checkbox programatically in android

it is possible to check use network provided values chekbox pro-grammatically?I want to check that checkbox using code.How can I do it?
Nitish Patel
  • 1,026
  • 2
  • 19
  • 36
3
votes
1 answer

Is there any way to get the application's run time in Cocoa for OS X?

I want to operate with time in my app. What I considered first is system's uptime. Since that looked hard to achieve, I am curious that whether there is a simple and efficient way to get my application's run time? Better time in miliseconds or…
Andrew Chang
  • 1,289
  • 1
  • 18
  • 38
3
votes
5 answers

Find the closest time to the current time

I guess my brain just threw an out of memory exception and crashed, My problem is I have a class member array of SYSTEMTIME size 3 which is user defined (read from a .lua) SYSTEMTIME m_MatchTime[3]; Then it's read this way from the…
Vinícius
  • 15,498
  • 3
  • 29
  • 53
3
votes
2 answers

SYSTEM Time, Local time, File time and normal time

Just want to make sure one thing. In a windows machine (either a desktop system or maybe a device like Windows Phone), if user changes the display time (maybe adjust time zone, or just change date/time in control panel), will that also changes the…
Allan Jiang
  • 11,063
  • 27
  • 104
  • 165
2
votes
1 answer

How to get system time in Zephyr RTOS?

I'm looking for ways to get current system time displayed in Zephyr RTOS(2.0) from user-space area. I'm using gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu tool-chain. Something similar to 'localtime' supported in GCC.
Ajay
  • 65
  • 1
  • 10
2
votes
1 answer

Change system / OS time with nodejs

Is there a way / library that can change the system time? In my case I need to update the time of a linux machine (Debian). I know there is a way to set the time with a shell command, what I am asking is if there is an abstraction library or another…
Kristofar
  • 71
  • 1
  • 3
2
votes
2 answers

convert Windows SYSTEMTIME to a string or char buf in C++ with user's "Region and Language" format?

How does my C++ program convert a SYSTEMTIME in the user's preferred "long date format" either as defaulted from their Language setting, or as custom-set on the Control Panel->Region and Language dialog? If it matters I'm on Visual Studio 2017 and…
Swiss Frank
  • 1,985
  • 15
  • 33
2
votes
1 answer

How to use an UWP Application on Raspberry PI to set the SystemTime

I get an exception if i run this Code on a RPI with W10iotCore: Windows.System.DateTimeSettings.SetSystemDateTime(new DateTime(sometime)); like System.UnauthorizedAccessException: Access is denied. I understand this exception but how can I run…
Daniel
  • 23
  • 2
2
votes
3 answers

How to get system date and time format in java?

I'm trying to read current system date and time format in java, but after analysing i couldn't find any method regarding this, so can anyone help me out.This is what i want read from java.
kadharbasha
  • 59
  • 2
  • 4
2
votes
1 answer

Retrieving boot time using GetTickCount64

I'm trying to extract boot time by getting current time SYSTEMTIME structure, then converting it to FILETIME which I then convert to ULARGE_INTEGER from which I subtract GetTickCount64() and then proceed on converting everything back to…
Alex Volkov
  • 2,812
  • 23
  • 27
2
votes
1 answer

COleDateTime adding an hour when constructed with time_t

I have a struct tm object that is converted to UNIX time_t using mktime, that when passed into the constructor of COleDateTime seems to be adding an hour to account for daylight savings (UK time), even though the documentation for COleDateTime…
Jack K
  • 82
  • 5
1 2
3
11 12