hyln9 / ikarus

Optimizing incremental native-code compiler for R6RS scheme. This is a forked repository.
https://launchpad.net/ikarus
Other
5 stars 0 forks source link

sleep binding #220

Closed hyln9 closed 10 years ago

hyln9 commented 10 years ago

this is a feature request. a way to pause the runtime would be very useful! attached is a binding to the posix nanosleep function that could perhaps be a starting point? regards, rohan

=== modified file 'scheme/ikarus.time-and-date.ss' --- scheme/ikarus.time-and-date.ss 2008-01-29 05:34:34 +0000 +++ scheme/ikarus.time-and-date.ss 2008-04-02 07:31:38 +0000 @@ -16,10 +16,12 @@

(library (ikarus system time-and-date) (export current-time time? time-second time-nanosecond

=== modified file 'scheme/makefile.ss' --- scheme/makefile.ss 2008-03-23 09:02:12 +0000 +++ scheme/makefile.ss 2008-04-02 07:32:21 +0000 @@ -382,6 +382,7 @@ [time-second i] [time-gmt-offset i] [time-nanosecond i]

+ikptr +ikrt_nanosleep(ikptr s, ikptr ns) {

Launchpad Details: #LP210678 rd - 2008-04-02 02:44:28 -0400

hyln9 commented 10 years ago

Will do.

Launchpad Details: #LPC Abdulaziz Ghuloum - 2008-04-11 05:08:50 -0400

hyln9 commented 10 years ago

Added in revision 1445. Example:

(time (nanosleep 3 135000000)) running stats for (nanosleep 3 135000000): no collections 0 ms elapsed cpu time, including 0 ms collecting 3135 ms elapsed real time, including 0 ms collecting 0 bytes allocated

Launchpad Details: #LPC Abdulaziz Ghuloum - 2008-04-11 05:41:17 -0400