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

sync/channels: provide `try_push(), try_pop() as public methods (#6101)

This commit is contained in:
Uwe Krüger
2020-08-10 18:06:42 +02:00
committed by GitHub
parent 36eae1c175
commit c3cdfa1c96
6 changed files with 82 additions and 17 deletions

View File

@@ -363,9 +363,10 @@ pub const(
nanosecond = Duration(1)
microsecond = Duration(1000) * nanosecond
millisecond = Duration(1000) * microsecond
second = Duration(1000) * millisecond
minute = Duration(60) * second
hour = Duration(60) * minute
second = Duration(1000) * millisecond
minute = Duration(60) * second
hour = Duration(60) * minute
infinite = Duration(-1)
)
// nanoseconds returns the duration as an integer number of nanoseconds.