Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
18
Task/System-time/Forth/system-time.fth
Normal file
18
Task/System-time/Forth/system-time.fth
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
[UNDEFINED] MS@ [IF] \ Win32Forth (rolls over daily)
|
||||
[DEFINED] ?MS [IF] ( -- ms )
|
||||
: ms@ ?MS ; \ iForth
|
||||
[ELSE] [DEFINED] cputime [IF] ( -- Dusec )
|
||||
: ms@ cputime d+ 1000 um/mod nip ; \ gforth: Anton Ertl
|
||||
[ELSE] [DEFINED] timer@ [IF] ( -- Dusec )
|
||||
: ms@ timer@ >us 1000 um/mod nip ; \ bigForth
|
||||
[ELSE] [DEFINED] gettimeofday [IF] ( -- usec sec )
|
||||
: ms@ gettimeofday 1000 MOD 1000 * SWAP 1000 / + ; \ PFE
|
||||
[ELSE] [DEFINED] counter [IF]
|
||||
: ms@ counter ; \ SwiftForth
|
||||
[ELSE] [DEFINED] GetTickCount [IF]
|
||||
: ms@ GetTickCount ; \ VFX Forth
|
||||
[ELSE] [DEFINED] MICROSECS [IF]
|
||||
: ms@ microsecs 1000 UM/MOD nip ; \ MacForth
|
||||
[THEN] [THEN] [THEN] [THEN] [THEN] [THEN] [THEN]
|
||||
|
||||
MS@ . \ print millisecond counter
|
||||
Loading…
Add table
Add a link
Reference in a new issue