mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
It seems more common to want to sleep for a duration than to sleep to a specific time. Change the implementation to not make the process look up the current time first. (Plus, there's no current syscall to do so)
24 lines
416 B
Modula-2
24 lines
416 B
Modula-2
object thread : object {
|
|
uid 11f23e593d5761bd
|
|
|
|
capabilities [
|
|
kill
|
|
]
|
|
|
|
method create [constructor] {
|
|
param process ref process [cap:create_thread]
|
|
param stack_top address
|
|
param entrypoint address
|
|
}
|
|
|
|
method kill [destructor cap:kill]
|
|
|
|
method exit [static] {
|
|
param status int32
|
|
}
|
|
|
|
method sleep [static] {
|
|
param duration uint64
|
|
}
|
|
}
|