time: add Duration.str() (#12897)

* time: add str() method to Duration

* add Duration.str tests, move time.infinite to time.v, to be visible to the JS backend

Co-authored-by: Delyan Angelov <delian66@gmail.com>
This commit is contained in:
Miccah 2021-12-19 11:32:42 -06:00 committed by GitHub
parent 840a92c14e
commit d07975335d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 83 additions and 13 deletions

View file

@ -119,7 +119,3 @@ fn convert_ctime(t C.tm, microsecond int) Time {
unix: make_unix_time(t)
}
}
pub const (
infinite = Duration(C.INT64_MAX)
)