diff --git a/basis/bootstrap/stage2.factor b/basis/bootstrap/stage2.factor index b011b41c4b..674cb2e7d5 100644 --- a/basis/bootstrap/stage2.factor +++ b/basis/bootstrap/stage2.factor @@ -59,7 +59,7 @@ SYMBOL: bootstrap-time [ ! We time bootstrap - millis + system-millis default-image-name "output-image" set-global @@ -84,14 +84,14 @@ SYMBOL: bootstrap-time load-components - millis over - core-bootstrap-time set-global + system-millis over - core-bootstrap-time set-global run-bootstrap-init f error set-global f error-continuation set-global - millis swap - bootstrap-time set-global + system-millis swap - bootstrap-time set-global print-report "deploy-vocab" get [ diff --git a/basis/calendar/calendar.factor b/basis/calendar/calendar.factor index 1564bc3ee4..e40b9be7fa 100644 --- a/basis/calendar/calendar.factor +++ b/basis/calendar/calendar.factor @@ -391,7 +391,7 @@ M: duration time- : gmt ( -- timestamp ) #! GMT time, right now - unix-1970 micros microseconds time+ ; + unix-1970 system-micros microseconds time+ ; : now ( -- timestamp ) gmt >local-time ; : hence ( duration -- timestamp ) now swap time+ ; diff --git a/basis/furnace/cache/cache.factor b/basis/furnace/cache/cache.factor index fe2840c9eb..d5d72b117f 100644 --- a/basis/furnace/cache/cache.factor +++ b/basis/furnace/cache/cache.factor @@ -22,7 +22,7 @@ server-state f : expire-state ( class -- ) new - -1/0. millis [a,b] >>expires + -1/0. system-millis [a,b] >>expires delete-tuples ; TUPLE: server-state-manager < filter-responder timeout ; diff --git a/basis/stack-checker/known-words/known-words.factor b/basis/stack-checker/known-words/known-words.factor index d45b54bd23..40e41d1a8d 100644 --- a/basis/stack-checker/known-words/known-words.factor +++ b/basis/stack-checker/known-words/known-words.factor @@ -511,11 +511,11 @@ M: bad-executable summary \ code-room { } { byte-array } define-primitive \ code-room make-flushable -\ micros { } { integer } define-primitive -\ micros make-flushable +\ system-micros { } { integer } define-primitive +\ system-micros make-flushable -\ nanos { } { integer } define-primitive -\ nanos make-flushable +\ nano-count { } { integer } define-primitive +\ nano-count make-flushable \ tag { object } { fixnum } define-primitive \ tag make-foldable diff --git a/basis/threads/threads.factor b/basis/threads/threads.factor index b7e0e1b87f..036324be87 100644 --- a/basis/threads/threads.factor +++ b/basis/threads/threads.factor @@ -95,7 +95,7 @@ PRIVATE> { { [ run-queue deque-empty? not ] [ 0 ] } { [ sleep-queue heap-empty? ] [ f ] } - [ sleep-queue heap-peek nip micros [-] ] + [ sleep-queue heap-peek nip system-micros [-] ] } cond ; DEFER: stop @@ -108,7 +108,7 @@ DEFER: stop : expire-sleep? ( heap -- ? ) dup heap-empty? - [ drop f ] [ heap-peek nip micros <= ] if ; + [ drop f ] [ heap-peek nip system-micros <= ] if ; : expire-sleep ( thread -- ) f >>sleep-entry resume ; @@ -184,7 +184,7 @@ M: f sleep-until GENERIC: sleep ( dt -- ) M: real sleep - micros + >integer sleep-until ; + system-micros + >integer sleep-until ; : interrupt ( thread -- ) dup state>> [ diff --git a/basis/tools/memory/memory.factor b/basis/tools/memory/memory.factor index cf7e3ee38d..6746031a3d 100644 --- a/basis/tools/memory/memory.factor +++ b/basis/tools/memory/memory.factor @@ -18,8 +18,8 @@ IN: tools.memory : kilobytes ( n -- str ) 1024 /i commas " KB" append ; -: micros>string ( n -- str ) - commas " µs" append ; +: nanos>string ( n -- str ) + 1000 /i commas " µs" append ; : copying-room. ( copying-sizes -- ) { @@ -153,11 +153,11 @@ TUPLE: gc-stats collections times ; [ collections>> ] [ times>> { - [ sum micros>string ] - [ mean >integer micros>string ] - [ median >integer micros>string ] - [ infimum micros>string ] - [ supremum micros>string ] + [ sum nanos>string ] + [ mean >integer nanos>string ] + [ median >integer nanos>string ] + [ infimum nanos>string ] + [ supremum nanos>string ] } cleave ] bi ] bi @@ -172,7 +172,7 @@ PRIVATE> : gc-event. ( event -- ) { { "Event type:" [ op>> gc-op-string ] } - { "Total time:" [ total-time>> micros>string ] } + { "Total time:" [ total-time>> nanos>string ] } { "Space reclaimed:" [ space-reclaimed kilobytes ] } } object-table. ; @@ -188,10 +188,10 @@ PRIVATE> { "Cards scanned:" [ [ cards-scanned>> ] map-sum commas ] } { "Decks scanned:" [ [ decks-scanned>> ] map-sum commas ] } { "Code blocks scanned:" [ [ code-blocks-scanned>> ] map-sum commas ] } - { "Total time:" [ [ total-time>> ] map-sum micros>string ] } - { "Card scan time:" [ [ card-scan-time>> ] map-sum micros>string ] } - { "Code block scan time:" [ [ code-scan-time>> ] map-sum micros>string ] } - { "Data heap sweep time:" [ [ data-sweep-time>> ] map-sum micros>string ] } - { "Code heap sweep time:" [ [ code-sweep-time>> ] map-sum micros>string ] } - { "Compaction time:" [ [ compaction-time>> ] map-sum micros>string ] } + { "Total time:" [ [ total-time>> ] map-sum nanos>string ] } + { "Card scan time:" [ [ card-scan-time>> ] map-sum nanos>string ] } + { "Code block scan time:" [ [ code-scan-time>> ] map-sum nanos>string ] } + { "Data heap sweep time:" [ [ data-sweep-time>> ] map-sum nanos>string ] } + { "Code heap sweep time:" [ [ code-sweep-time>> ] map-sum nanos>string ] } + { "Compaction time:" [ [ compaction-time>> ] map-sum nanos>string ] } } object-table. ; diff --git a/basis/tools/threads/threads.factor b/basis/tools/threads/threads.factor index 18dd8ce2b7..aa07d3de92 100644 --- a/basis/tools/threads/threads.factor +++ b/basis/tools/threads/threads.factor @@ -14,7 +14,7 @@ IN: tools.threads ] with-cell [ sleep-entry>> [ - key>> micros [-] number>string write + key>> nano-count 1000 /i [-] number>string write " us" write ] when* ] with-cell ; diff --git a/basis/tools/time/time-docs.factor b/basis/tools/time/time-docs.factor index 9e892c33ec..4d3054db8a 100644 --- a/basis/tools/time/time-docs.factor +++ b/basis/tools/time/time-docs.factor @@ -10,7 +10,7 @@ ARTICLE: "timing" "Timing code and collecting statistics" "A lower-level word puts timings on the stack, intead of printing:" { $subsections benchmark } "You can also read the system clock directly:" -{ $subsections micros } +{ $subsections system-micros } { $see-also "profiling" "calendar" } ; ABOUT: "timing" @@ -25,7 +25,7 @@ HELP: time { $values { "quot" quotation } } { $description "Runs a quotation, gathering statistics about method dispatch and garbage collection, and then prints the total run time." } ; -{ benchmark micros time } related-words +{ benchmark system-micros system-millis time } related-words HELP: collect-gc-events { $values { "quot" quotation } } diff --git a/basis/tools/time/time.factor b/basis/tools/time/time.factor index 3724a741b7..0bd97f563d 100644 --- a/basis/tools/time/time.factor +++ b/basis/tools/time/time.factor @@ -5,10 +5,10 @@ tools.dispatch ; IN: tools.time : benchmark ( quot -- runtime ) - micros [ call micros ] dip - ; inline + nano-count [ call nano-count ] dip - ; inline : time. ( time -- ) - "Running time: " write 1000000 /f pprint " seconds" print ; + "Running time: " write 1000000000 /f pprint " seconds" print ; : time-banner. ( -- ) "Additional information was collected." print diff --git a/basis/ui/gestures/gestures-docs.factor b/basis/ui/gestures/gestures-docs.factor index 3deb0c619d..bb33e28da3 100644 --- a/basis/ui/gestures/gestures-docs.factor +++ b/basis/ui/gestures/gestures-docs.factor @@ -174,7 +174,7 @@ HELP: hand-last-button { $var-description "Global variable. The mouse button most recently pressed." } ; HELP: hand-last-time -{ $var-description "Global variable. The timestamp of the most recent mouse button click. This timestamp has the same format as the output value of " { $link micros } "." } ; +{ $var-description "Global variable. The timestamp of the most recent mouse button click. This timestamp has the same format as the output value of " { $link system-micros } "." } ; HELP: hand-buttons { $var-description "Global variable. A vector of mouse buttons currently held down." } ; diff --git a/core/bootstrap/primitives.factor b/core/bootstrap/primitives.factor index 072f41c086..64e22ebabf 100644 --- a/core/bootstrap/primitives.factor +++ b/core/bootstrap/primitives.factor @@ -432,8 +432,8 @@ tuple { "(exit)" "system" (( n -- )) } { "data-room" "memory" (( -- data-room )) } { "code-room" "memory" (( -- code-room )) } - { "micros" "system" (( -- us )) } - { "nanos" "system" (( -- us )) } + { "system-micros" "system" (( -- us )) } + { "nano-count" "system" (( -- ns )) } { "modify-code-heap" "compiler.units" (( alist -- )) } { "(dlopen)" "alien.libraries" (( path -- dll )) } { "(dlsym)" "alien.libraries" (( name dll -- alien )) } diff --git a/core/system/system-docs.factor b/core/system/system-docs.factor index ba9411fac6..364ad04fa2 100644 --- a/core/system/system-docs.factor +++ b/core/system/system-docs.factor @@ -16,8 +16,8 @@ ARTICLE: "system" "System interface" } "Getting the current time:" { $subsections - micros - millis + system-micros + system-micros } "Exiting the Factor VM:" { $subsections exit } ; @@ -77,12 +77,12 @@ HELP: exit ( n -- ) { $values { "n" "an integer exit code" } } { $description "Exits the Factor process." } ; -HELP: micros ( -- us ) +HELP: system-micros ( -- us ) { $values { "us" integer } } { $description "Outputs the number of microseconds ellapsed since midnight January 1, 1970." } { $notes "This is a low-level word. The " { $vocab-link "calendar" } " vocabulary provides features for date/time arithmetic and formatting." } ; -HELP: millis ( -- ms ) +HELP: system-millis ( -- ms ) { $values { "ms" integer } } { $description "Outputs the number of milliseconds ellapsed since midnight January 1, 1970." } { $notes "This is a low-level word. The " { $vocab-link "calendar" } " vocabulary provides features for date/time arithmetic and formatting." } ; diff --git a/core/system/system.factor b/core/system/system.factor index 5ee10374fc..31daa49b9f 100644 --- a/core/system/system.factor +++ b/core/system/system.factor @@ -55,6 +55,6 @@ PRIVATE> : embedded? ( -- ? ) 15 getenv ; -: millis ( -- ms ) micros 1000 /i ; +: system-millis ( -- ms ) system-micros 1000 /i ; : exit ( n -- ) do-shutdown-hooks (exit) ; diff --git a/extra/game/loop/loop.factor b/extra/game/loop/loop.factor index 1346988fd1..eec133ed19 100644 --- a/extra/game/loop/loop.factor +++ b/extra/game/loop/loop.factor @@ -21,7 +21,7 @@ GENERIC: draw* ( tick-slice delegate -- ) SYMBOL: game-loop : since-last-tick ( loop -- milliseconds ) - last-tick>> millis swap - ; + last-tick>> system-millis swap - ; : tick-slice ( loop -- slice ) [ since-last-tick ] [ tick-length>> ] bi /f 1.0 min ; @@ -53,7 +53,7 @@ TUPLE: game-loop-error game-loop error ; drop ; : ?tick ( loop count -- ) - [ millis >>last-tick drop ] [ + [ system-millis >>last-tick drop ] [ over [ since-last-tick ] [ tick-length>> ] bi >= [ [ drop increment-tick ] [ drop tick ] [ 1 - ?tick ] 2tri ] [ 2drop ] if @@ -70,12 +70,12 @@ TUPLE: game-loop-error game-loop error ; with-variable ; : benchmark-millis ( loop -- millis ) - millis swap benchmark-time>> - ; + system-millis swap benchmark-time>> - ; PRIVATE> : reset-loop-benchmark ( loop -- ) - millis >>benchmark-time + system-millis >>benchmark-time dup tick-number>> >>benchmark-tick-number dup frame-number>> >>benchmark-frame-number drop ; @@ -86,7 +86,7 @@ PRIVATE> [ frame-number>> ] [ benchmark-frame-number>> - ] [ benchmark-millis ] tri /f ; : start-loop ( loop -- ) - millis >>last-tick + system-millis >>last-tick t >>running? [ reset-loop-benchmark ] [ [ run-loop ] curry "game loop" spawn ] @@ -98,7 +98,7 @@ PRIVATE> drop ; : ( tick-length delegate -- loop ) - millis f f 0 0 millis 0 0 + system-millis f f 0 0 system-millis 0 0 game-loop boa ; M: game-loop dispose diff --git a/extra/jamshred/player/player.factor b/extra/jamshred/player/player.factor index 6982af63f6..233d34e078 100644 --- a/extra/jamshred/player/player.factor +++ b/extra/jamshred/player/player.factor @@ -39,9 +39,9 @@ CONSTANT: max-speed 30.0 >>tunnel to-tunnel-start ; : update-time ( player -- seconds-passed ) - millis swap [ last-move>> - 1000 / ] [ (>>last-move) ] 2bi ; + system-millis swap [ last-move>> - 1000 / ] [ (>>last-move) ] 2bi ; -: moved ( player -- ) millis swap (>>last-move) ; +: moved ( player -- ) system-millis swap (>>last-move) ; : speed-range ( -- range ) max-speed [0,b] ; diff --git a/extra/space-invaders/space-invaders.factor b/extra/space-invaders/space-invaders.factor index 3d03691287..76284532b4 100755 --- a/extra/space-invaders/space-invaders.factor +++ b/extra/space-invaders/space-invaders.factor @@ -358,8 +358,8 @@ M: space-invaders update-video ( value addr cpu -- ) : sync-frame ( millis -- millis ) #! Sleep until the time for the next frame arrives. - 1000 60 / >fixnum + system:millis - dup 0 > - [ milliseconds threads:sleep ] [ drop threads:yield ] if system:millis ; + 1000 60 / >fixnum + system:system-millis - dup 0 > + [ milliseconds threads:sleep ] [ drop threads:yield ] if system:system-millis ; : invaders-process ( millis gadget -- ) #! Run a space invaders gadget inside a @@ -377,7 +377,7 @@ M: space-invaders update-video ( value addr cpu -- ) M: invaders-gadget graft* ( gadget -- ) dup cpu>> init-sounds f over (>>quit?) - [ system:millis swap invaders-process ] curry + [ system:system-millis swap invaders-process ] curry "Space invaders" threads:spawn drop ; M: invaders-gadget ungraft* ( gadget -- ) diff --git a/extra/tetris/game/game.factor b/extra/tetris/game/game.factor index c9e235ff79..fdf6e10d5d 100644 --- a/extra/tetris/game/game.factor +++ b/extra/tetris/game/game.factor @@ -104,10 +104,10 @@ CONSTANT: default-height 20 dup { 0 1 } tetris-move [ move-drop ] [ lock-piece ] if ; : update ( tetris -- ) - millis over last-update>> - + system-millis over last-update>> - over update-interval > [ dup move-down - millis >>last-update + system-millis >>last-update ] when drop ; : ?update ( tetris -- ) diff --git a/extra/animations/animations-docs.factor b/unmaintained/animations/animations-docs.factor similarity index 100% rename from extra/animations/animations-docs.factor rename to unmaintained/animations/animations-docs.factor diff --git a/extra/animations/animations.factor b/unmaintained/animations/animations.factor similarity index 100% rename from extra/animations/animations.factor rename to unmaintained/animations/animations.factor diff --git a/extra/animations/authors.txt b/unmaintained/animations/authors.txt similarity index 100% rename from extra/animations/authors.txt rename to unmaintained/animations/authors.txt diff --git a/vm/factor.cpp b/vm/factor.cpp index 525b2fa43e..9096980097 100755 --- a/vm/factor.cpp +++ b/vm/factor.cpp @@ -119,7 +119,7 @@ void factor_vm::init_factor(vm_parameters *p) if(p->image_path == NULL) p->image_path = default_image_path(); - srand(current_micros()); + srand(system_micros()); init_ffi(); init_stacks(p->ds_size,p->rs_size); init_callbacks(p->callback_size); diff --git a/vm/gc.cpp b/vm/gc.cpp index 32ca44ae1c..ff458e95dc 100755 --- a/vm/gc.cpp +++ b/vm/gc.cpp @@ -8,7 +8,7 @@ gc_event::gc_event(gc_op op_, factor_vm *parent) : cards_scanned(0), decks_scanned(0), code_blocks_scanned(0), - start_time(current_micros()), + start_time(nano_count()), card_scan_time(0), code_scan_time(0), data_sweep_time(0), @@ -17,70 +17,70 @@ gc_event::gc_event(gc_op op_, factor_vm *parent) : { data_heap_before = parent->data_room(); code_heap_before = parent->code_room(); - start_time = current_micros(); + start_time = nano_count(); } void gc_event::started_card_scan() { - temp_time = current_micros(); + temp_time = nano_count(); } void gc_event::ended_card_scan(cell cards_scanned_, cell decks_scanned_) { cards_scanned += cards_scanned_; decks_scanned += decks_scanned_; - card_scan_time = (current_micros() - temp_time); + card_scan_time = (nano_count() - temp_time); } void gc_event::started_code_scan() { - temp_time = current_micros(); + temp_time = nano_count(); } void gc_event::ended_code_scan(cell code_blocks_scanned_) { code_blocks_scanned += code_blocks_scanned_; - code_scan_time = (current_micros() - temp_time); + code_scan_time = (nano_count() - temp_time); } void gc_event::started_data_sweep() { - temp_time = current_micros(); + temp_time = nano_count(); } void gc_event::ended_data_sweep() { - data_sweep_time = (current_micros() - temp_time); + data_sweep_time = (nano_count() - temp_time); } void gc_event::started_code_sweep() { - temp_time = current_micros(); + temp_time = nano_count(); } void gc_event::ended_code_sweep() { - code_sweep_time = (current_micros() - temp_time); + code_sweep_time = (nano_count() - temp_time); } void gc_event::started_compaction() { - temp_time = current_micros(); + temp_time = nano_count(); } void gc_event::ended_compaction() { - compaction_time = (current_micros() - temp_time); + compaction_time = (nano_count() - temp_time); } void gc_event::ended_gc(factor_vm *parent) { data_heap_after = parent->data_room(); code_heap_after = parent->code_room(); - total_time = current_micros() - start_time; + total_time = nano_count() - start_time; } -gc_state::gc_state(gc_op op_, factor_vm *parent) : op(op_), start_time(current_micros()) +gc_state::gc_state(gc_op op_, factor_vm *parent) : op(op_), start_time(nano_count()) { event = new gc_event(op,parent); } diff --git a/vm/os-genunix.cpp b/vm/os-genunix.cpp index 15c6268bbb..ba23125e80 100644 --- a/vm/os-genunix.cpp +++ b/vm/os-genunix.cpp @@ -35,7 +35,7 @@ const char *default_image_path() return new_path; } -u64 current_nanos() +u64 nano_count() { struct timespec t; int ret; diff --git a/vm/os-macosx.mm b/vm/os-macosx.mm index fa13d8fd15..a4b2191100 100644 --- a/vm/os-macosx.mm +++ b/vm/os-macosx.mm @@ -85,7 +85,7 @@ Protocol *objc_getProtocol(char *name) return nil; } -u64 current_nanos() +u64 nano_count() { u64 t; mach_timebase_info_data_t info; diff --git a/vm/os-unix.cpp b/vm/os-unix.cpp index 63d68e2787..075ceff421 100644 --- a/vm/os-unix.cpp +++ b/vm/os-unix.cpp @@ -40,11 +40,11 @@ factor_vm *tls_vm() static void *null_dll; -s64 current_micros() +u64 system_micros() { struct timeval t; gettimeofday(&t,NULL); - return (s64)t.tv_sec * 1000000 + t.tv_usec; + return (u64)t.tv_sec * 1000000 + t.tv_usec; } void sleep_micros(cell usec) @@ -52,9 +52,19 @@ void sleep_micros(cell usec) usleep(usec); } -void sleep_nanos(cell nsec) +void sleep_nanos(timespec ts) { - //nanosleep(n + timespec ts_rem; + int ret; + ret = nanosleep(&ts,&ts_rem); + while(ret == -1 && errno == EINTR) + { + memcpy(&ts, &ts_rem, sizeof(ts)); + ret = nanosleep(&ts, &ts_rem); + } + + if(ret == -1) + fatal_error("nanosleep failed", 0); } void factor_vm::init_ffi() diff --git a/vm/os-unix.hpp b/vm/os-unix.hpp index 52a3bd8676..40d1255c8c 100644 --- a/vm/os-unix.hpp +++ b/vm/os-unix.hpp @@ -52,9 +52,10 @@ void unix_init_signals(); void signal_handler(int signal, siginfo_t* siginfo, void* uap); void dump_stack_signal(int signal, siginfo_t* siginfo, void* uap); -s64 current_micros(); -u64 current_nanos(); +u64 system_micros(); +u64 nano_count(); void sleep_micros(cell usec); +void sleep_nanos(cell nsec); void init_platform_globals(); diff --git a/vm/os-windows-ce.cpp b/vm/os-windows-ce.cpp index f51953e6eb..a57db667c4 100644 --- a/vm/os-windows-ce.cpp +++ b/vm/os-windows-ce.cpp @@ -3,7 +3,7 @@ namespace factor { -s64 current_micros() +u64 system_micros() { SYSTEMTIME st; FILETIME ft; diff --git a/vm/os-windows-ce.hpp b/vm/os-windows-ce.hpp index f41262e54b..48da3fa551 100644 --- a/vm/os-windows-ce.hpp +++ b/vm/os-windows-ce.hpp @@ -22,7 +22,7 @@ char *getenv(char *name); #define snprintf _snprintf #define snwprintf _snwprintf -s64 current_micros(); +u64 system_micros(); void c_to_factor_toplevel(cell quot); void open_console(); diff --git a/vm/os-windows-nt.cpp b/vm/os-windows-nt.cpp index 3feabfe8bc..c46628d41e 100755 --- a/vm/os-windows-nt.cpp +++ b/vm/os-windows-nt.cpp @@ -28,15 +28,15 @@ factor_vm *tls_vm() return vm; } -s64 current_micros() +u64 system_micros() { FILETIME t; GetSystemTimeAsFileTime(&t); - return (((s64)t.dwLowDateTime | (s64)t.dwHighDateTime<<32) + return (((u64)t.dwLowDateTime | (u64)t.dwHighDateTime<<32) - EPOCH_OFFSET) / 10; } -u64 current_nanos() +u64 nano_count() { LARGE_INTEGER count; LARGE_INTEGER frequency; diff --git a/vm/os-windows.hpp b/vm/os-windows.hpp index fd24120b95..37591a529f 100644 --- a/vm/os-windows.hpp +++ b/vm/os-windows.hpp @@ -43,8 +43,8 @@ typedef wchar_t vm_char; inline static void init_signals() {} inline static void early_init() {} -s64 current_micros(); -u64 current_nanos(); +u64 system_micros(); +u64 nano_count(); long getpagesize(); } diff --git a/vm/primitives.cpp b/vm/primitives.cpp index ed877cb645..dc1ca8246d 100644 --- a/vm/primitives.cpp +++ b/vm/primitives.cpp @@ -66,8 +66,8 @@ PRIMITIVE_FORWARD(set_callstack) PRIMITIVE_FORWARD(exit) PRIMITIVE_FORWARD(data_room) PRIMITIVE_FORWARD(code_room) -PRIMITIVE_FORWARD(micros) -PRIMITIVE_FORWARD(nanos) +PRIMITIVE_FORWARD(system_micros) +PRIMITIVE_FORWARD(nano_count) PRIMITIVE_FORWARD(modify_code_heap) PRIMITIVE_FORWARD(dlopen) PRIMITIVE_FORWARD(dlsym) @@ -203,8 +203,8 @@ const primitive_type primitives[] = { primitive_exit, primitive_data_room, primitive_code_room, - primitive_micros, - primitive_nanos, + primitive_system_micros, + primitive_nano_count, primitive_modify_code_heap, primitive_dlopen, primitive_dlsym, diff --git a/vm/run.cpp b/vm/run.cpp index 81f155c57e..9203dcf1e9 100755 --- a/vm/run.cpp +++ b/vm/run.cpp @@ -8,14 +8,14 @@ void factor_vm::primitive_exit() exit(to_fixnum(dpop())); } -void factor_vm::primitive_micros() +void factor_vm::primitive_system_micros() { - box_unsigned_8(current_micros()); + box_unsigned_8(system_micros()); } -void factor_vm::primitive_nanos() +void factor_vm::primitive_nano_count() { - box_unsigned_8(current_nanos()); + box_unsigned_8(nano_count()); } void factor_vm::primitive_sleep() diff --git a/vm/vm.hpp b/vm/vm.hpp index f96777613a..4f2544db25 100755 --- a/vm/vm.hpp +++ b/vm/vm.hpp @@ -117,8 +117,8 @@ struct factor_vm // run void primitive_exit(); - void primitive_micros(); - void primitive_nanos(); + void primitive_system_micros(); + void primitive_nano_count(); void primitive_sleep(); void primitive_set_slot();