Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
time
/
misc
/
misc.v
11
lines
·
8
sloc
·
225 bytes
·
008aaad99981918c51194d7aaaaaccb4c258f244
Raw
1
module
misc
2
3
import
rand
4
import
time
5
6
const
start_time_unix = time.now().unix()
7
8
// random returns a random time struct in *the past*.
9
pub
fn
random() time.Time {
10
return
time.unix(int(rand.i64n(start_time_unix)
or
{ 0 }))
11
}
12