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

7 Commits

Author SHA1 Message Date
Delyan Angelov
3c38abc56e
rand: fix rand.uuid_v4()'s clock_seq_hi_and_reserved field 2022-02-18 12:43:38 +02:00
Delyan Angelov
efa8dcf4d2
time: turn Time.unix to i64, so it can represent times before 1970-01-01, fix time operators, add more tests (#11050) 2021-08-04 13:12:02 +03:00
Alexander Medvednikov
3a2d696fac time: time.wait() => time.sleep() 2021-02-27 20:41:06 +03:00
zakuro
ac4791045f
time: consolidate the different sleep functions into time.wait(Duration) (#8853) 2021-02-21 17:05:03 +02:00
Subhomoy Haldar
97103f680a
rand: separate rand.util and rand.seed submodules (#8353) 2021-01-26 15:55:09 +02:00
Delyan Angelov
dfa01d8877 rand: add rand.ulid_at_millisecond/1, use it in rand.ulid/0 2020-07-26 14:17:29 +03:00
penguindark
7d52d612ce
rand: add rand.ulid() (#5979)
* removed debug println

* added newline to the end of the file

* time: add .unix_time_milli() method; rand,time: add tests

* rand: add more ulid tests; move tests to a separate file random_identifiers_test.v

* run vfmt over vlib/rand/random_identifiers_test.v

* speed up time.unix_time_milli

* simplify and speedup time.unix_time/0 and time.new_time/1

* update comment about rand.ulid()

* fix terminating 0 off by 1 issue in rand.ulid()

* optimize time.new_time()

* restore the master version of vlib/time/parse.v

* make test_unix_time more robust

Co-authored-by: Delyan Angelov <delian66@gmail.com>
2020-07-26 13:10:56 +03:00