1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

time: update doc comments (#18947)

This commit is contained in:
Turiiya
2023-07-22 20:30:36 +02:00
committed by GitHub
parent 41f99c1abf
commit ac0ae1966a
8 changed files with 21 additions and 18 deletions

View File

@ -125,7 +125,7 @@ pub fn (d Duration) timespec() C.timespec {
return ts
}
// return timespec of 1970/1/1
// zero_timespec returns the calendar time in seconds and nanoseconds of the beginning of the Unix epoch.
pub fn zero_timespec() C.timespec {
ts := C.timespec{
tv_sec: 0
@ -134,7 +134,7 @@ pub fn zero_timespec() C.timespec {
return ts
}
// sleep makes the calling thread sleep for a given duration (in nanoseconds).
// sleep suspends the execution of the calling thread for a given duration (in nanoseconds).
pub fn sleep(duration Duration) {
mut req := C.timespec{duration / second, duration % second}
rem := C.timespec{}