Revision history for KeyPgTimer


Revision [21156]

Last edited on 2016-03-13 11:20:45 by fxm [Formatting]
Additions:






Revision [20554]

Edited on 2016-02-10 16:09:34 by DkLwikki [Update link format]
Additions:
[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **Timer** ( ) [[KeyPgAs|as]] [[KeyPgDouble|double]]
Returns a ##[[KeyPgDouble|double]]## precision result with the time, in seconds, since a static reference point.
- On ""Win32"" and Linux, if the program must wait for periods of 0.1 seconds or more, ##[[KeyPgSleep|Sleep]]## should be used, this allows other programs to run during the waiting period. For shorter delays, a loop using TIMER can be more precise.
~&//Note for DOS users: today, the number of seconds since 1970 is in excess of ##10^9##, and is therefore unsuitable for storing in ##[[KeyPgSingle|Single]]##-precision variables, also it shouldn't be multiplied (to get 1/10 seconds or so) and stored in 32-bit integer variables then//
- Usage of TIMER can cause disk accesses in DOS, see [[http://www.freebasic.net/forum/viewtopic.php?t=12985|forum]] for analysis and solutions
- ##[[KeyPgTime|Time]]##
- ##[[KeyPgSleep|Sleep]]##
Deletions:
[[KeyPgDeclare declare]] [[KeyPgFunction function]] **Timer** ( ) [[KeyPgAs as]] [[KeyPgDouble double]]
Returns a ##[[KeyPgDouble double]]## precision result with the time, in seconds, since a static reference point.
- On ""Win32"" and Linux, if the program must wait for periods of 0.1 seconds or more, ##[[KeyPgSleep Sleep]]## should be used, this allows other programs to run during the waiting period. For shorter delays, a loop using TIMER can be more precise.
~&//Note for DOS users: today, the number of seconds since 1970 is in excess of ##10^9##, and is therefore unsuitable for storing in ##[[KeyPgSingle Single]]##-precision variables, also it shouldn't be multiplied (to get 1/10 seconds or so) and stored in 32-bit integer variables then//
- Usage of TIMER can cause disk accesses in DOS, see [[http://www.freebasic.net/forum/viewtopic.php?t=12985 forum]] for analysis and solutions
- ##[[KeyPgTime Time]]##
- ##[[KeyPgSleep Sleep]]##


Revision [16173]

Edited on 2012-05-14 11:00:25 by MjKwikki [Update link format]
Deletions:


Revision [16172]

Edited on 2012-05-14 10:59:48 by MjKwikki [Update link format]
Additions:
The value returned by ##**Timer**## is NOT affected by the automatic changing of the system clock, in Spring and Autumn, for DST (Daylight Savings Time).

- In QB, TIMER returned the number of seconds from last midnight, and its accuracy was 1/18 secs
Deletions:
- In QB TIMER returned the number of seconds from last midnight, and its accuracy was 1/18 secs


Revision [14120]

Edited on 2009-02-24 02:40:01 by DoS386 [trouble]
Additions:
- The reference point chosen varies, depending on the platform. On Windows, the time is measured relative to the point the computer was booted up. On DOS, the time is measured relative to Jan 1 1970.
~&//Note for DOS users: today, the number of seconds since 1970 is in excess of ##10^9##, and is therefore unsuitable for storing in ##[[KeyPgSingle Single]]##-precision variables, also it shouldn't be multiplied (to get 1/10 seconds or so) and stored in 32-bit integer variables then//
- Usage of TIMER can cause disk accesses in DOS, see [[http://www.freebasic.net/forum/viewtopic.php?t=12985 forum]] for analysis and solutions
Deletions:
- The reference point chosen varies, depending on the platform. On Windows, the time is measured relative to the point the computer was turned on. On DOS, the time is measured relative to Jan 1 1970.
~&//Note for DOS users: today, the number of seconds since 1970 is in excess of ##10^9##, and is therefore unsuitable for storing in ##[[KeyPgSingle Single]]##-precision variables.//


Revision [14064]

Edited on 2008-12-24 21:04:38 by CountingPine [TIMER measures relative to 1970 in DOS version]
Additions:
- On ""Win32"" and Linux, if the program must wait for periods of 0.1 seconds or more, ##[[KeyPgSleep Sleep]]## should be used, this allows other programs to run during the waiting period. For shorter delays, a loop using TIMER can be more precise.
- The reference point chosen varies, depending on the platform. On Windows, the time is measured relative to the point the computer was turned on. On DOS, the time is measured relative to Jan 1 1970.
~&//Note for DOS users: today, the number of seconds since 1970 is in excess of ##10^9##, and is therefore unsuitable for storing in ##[[KeyPgSingle Single]]##-precision variables.//
Deletions:
- On Win32 and Linux, if the program must wait for periods of 0.1 seconds or more, ##[[KeyPgSleep Sleep]]## should be used, this allows other programs to run during the waiting period. For shorter delays, a loop using TIMER can be more precise.
- The reference point chosen varies, depending on the platform. On Windows, the time is measured relative to the point the computer was turned on. On DOS, the time is measured relative to midnight, and resets to 0 every time midnight is reached.


Revision [13511]

The oldest known version of this page was created on 2008-07-15 03:19:12 by DoS386 [TIMER measures relative to 1970 in DOS version]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode