Remove extra/micros since we have this in the core now
parent
7788b3e0db
commit
3660643dcc
|
@ -1 +0,0 @@
|
|||
Phil Dawes
|
|
@ -1,4 +0,0 @@
|
|||
IN: micros.backend
|
||||
USING: io.backend ;
|
||||
|
||||
HOOK: (micros) io-backend ( -- n )
|
|
@ -1,14 +0,0 @@
|
|||
IN: micros
|
||||
USING: help.syntax help.markup kernel prettyprint sequences ;
|
||||
|
||||
HELP: micros
|
||||
{ $values { "n" "an integer" } }
|
||||
{ $description "Outputs the number of microseconds ellapsed since midnight January 1, 1970"
|
||||
} ;
|
||||
|
||||
|
||||
HELP: micro-time
|
||||
{ $values { "quot" "a quot" }
|
||||
{ "n" "an integer" } }
|
||||
{ $description "executes the quotation and pushes the number of microseconds taken onto the stack"
|
||||
} ;
|
|
@ -1,7 +0,0 @@
|
|||
IN: micros.tests
|
||||
USING: micros tools.test math math.functions system kernel ;
|
||||
|
||||
! a bit racy but I can't think of a better way to check this right now
|
||||
[ t ]
|
||||
[ millis 1000 / micros 1000000 / [ truncate ] bi@ = ] unit-test
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
IN: micros
|
||||
USING: micros.backend system kernel combinators vocabs.loader math ;
|
||||
|
||||
: micros ( -- n ) (micros) ; inline
|
||||
|
||||
: micro-time ( quot -- n )
|
||||
micros slip micros swap - ; inline
|
||||
|
||||
{
|
||||
{ [ os unix? ] [ "micros.unix" ] }
|
||||
{ [ os windows? ] [ "micros.windows" ] }
|
||||
} cond require
|
||||
|
|
@ -1 +0,0 @@
|
|||
Microsecond precision clock
|
|
@ -1 +0,0 @@
|
|||
unportable
|
|
@ -1,6 +0,0 @@
|
|||
IN: micros.unix
|
||||
USING: micros.backend io.backend system alien.c-types kernel unix.time math ;
|
||||
|
||||
M: unix (micros)
|
||||
"timespec" <c-object> dup f gettimeofday drop
|
||||
[ timespec-sec 1000000 * ] [ timespec-nsec ] bi + ;
|
|
@ -1 +0,0 @@
|
|||
unportable
|
|
@ -1,7 +0,0 @@
|
|||
IN: micros.windows
|
||||
USING: system kernel windows.time math math.functions micros.backend ;
|
||||
|
||||
! 116444736000000000 is the windowstime epoch offset
|
||||
! since windowstime starts at 1600 and unix epoch is 1970
|
||||
M: windows (micros)
|
||||
windows-time 116444736000000000 - 10 / truncate ;
|
Loading…
Reference in New Issue