Home > Back-end >  How to get a second 50 centisecond before?
How to get a second 50 centisecond before?

Time:09-30

How to get a second 50 centisecond before?

CodePudding user response:

What circumstances

CodePudding user response:

Read the file
Have anything to do with this?

CodePudding user response:

Before the second 50 centisecond?
Only heard of milliseconds,,,

Hope that in the system time for each of the n - 0.05 seconds when the triggering event?

CodePudding user response:

The
reference 3 floor sz_haitao response:
50 centisecond before per second?
Only heard of milliseconds,,,

Hope that in the system time for each of the n - 0.05 seconds when the triggering event?


Yes, how should do

CodePudding user response:

TTimer only 1/1000 of a second,
DateTime only 1/10000 of a second,

CodePudding user response:

Use the gettickcount function

CodePudding user response:

Using gettickcount function to judge whether the current value of x is 1000 integer, if so, then as the beginning of the second

Then cycle

 
Var
X: int64;
The begin
X:=gettickcount;
If x mod 1000=0 then
The begin
While gettickcount - x<50 do
The begin
//this is you want to be in top 50 milliseconds to execute a second content
end;
end;
end;

CodePudding user response:

If Frac (Now * 86400) & lt; 0.5 is XXX (the length of time, you need half a second) then

CodePudding user response:

The gettickcount, Now can only produce the timing precision of 0.01 seconds, (ms)

CodePudding user response:

1 seconds=1000 milliseconds (ms)
1 ms=1/1000 of a second (s)
1 seconds=1000000 microseconds (mu s)
1 millisecond=1/1000000 of a second (s)
1 seconds=1000000000 nanoseconds (ns)
1 ns=1/1000000000 of a second (s)
1 seconds=1000000000000 picoseconds (ps)
1 picosecond=1/1000000000000 of a second (s)

What is the meaning of the building Lord centisecond?

CodePudding user response:

1 seconds=100 centisecond??

Return true have never seen a centisecond this unit,,,

CodePudding user response:

11 references hongss response:
=100 centisecond 1 SEC??

Return true have never seen a centisecond this unit,,,


The
references to the tenth floor lyhoo163 response:
=1 SEC 1000 milliseconds (ms)
1 ms=1/1000 of a second (s)
1 seconds=1000000 microseconds (mu s)
1 millisecond=1/1000000 of a second (s)
1 seconds=1000000000 nanoseconds (ns)
1 ns=1/1000000000 of a second (s)
1 seconds=1000000000000 picoseconds (ps)
1 picosecond=1/1000000000000 of a second (s)

What is the meaning of the building Lord centisecond?


I haven't seen, in a software web site to see

CodePudding user response:

references 9 f lyhoo163 response:
gettickcount, Now can only produce the timing precision of 0.01 seconds, (ms)


Gettickcount of millisecond precision is 0.001

CodePudding user response:

Correct the gettickcount, Now can only produce the timing precision of 1/1000 of a second,

CodePudding user response:

Windows inside, there is a very high precision timer in microsecond precision, but the frequency of the different system this timer is different, the frequency is associated with hardware and operating system may have, using the API function QueryPerformanceFrequency be able to get the frequency of the timer, API QueryPerformanceCounter function can be used to get the current value of the timer,

QueryPerformanceFrequency
The QueryPerformanceCounter
Can try these two functions

CodePudding user response:

Centisecond: http://cn.bing.com/dict/%E5%8E%98%E7%A7%92

CodePudding user response:

In addition, the GetTickCount unit is a millisecond, but can not reach 1 millisecond precision, can only achieve 10 milliseconds (single core processor) or 15 milliseconds (multi-core processors),

CodePudding user response:

  • Related