IY
Size: a a a
IY
AS
AS
ДВ
ДВ
АН
AS
AS
AS
lubridate
есть вариант сделать это "по красоте".ДВ
АК
> lubridate::hour(Sys.time()) > 19
[1] TRUE
АН
ED
as.numeric(Sys.time())%%(24*3600)
AS
> lubridate::hour(Sys.time()) > 19
[1] TRUE
AS
fj
AS
ДВ
АК
as.numeric(Sys.time())%%(24*3600)
> x <- Sys.time()
> bench::mark(unclass(x), as.numeric(x))
# A tibble: 2 x 13
expression min median `itr/sec` mem_alloc `gc/sec` n_itr n_gc total_time
<bch:expr> <bch> <bch:> <dbl> <bch:byt> <dbl> <int> <dbl> <bch:tm>
1 unclass(x) 100ns 110ns 8047746. NA 0 10000 0 1.24ms
2 as.numeric(x) 480ns 500ns 1869636. NA 0 10000 0 5.35ms
# … with 4 more variables: result <list>, memory <list>, time <list>, gc <list>
АК
> x <- Sys.time()
> bench::mark(unclass(x), as.numeric(x))
# A tibble: 2 x 13
expression min median `itr/sec` mem_alloc `gc/sec` n_itr n_gc total_time
<bch:expr> <bch> <bch:> <dbl> <bch:byt> <dbl> <int> <dbl> <bch:tm>
1 unclass(x) 100ns 110ns 8047746. NA 0 10000 0 1.24ms
2 as.numeric(x) 480ns 500ns 1869636. NA 0 10000 0 5.35ms
# … with 4 more variables: result <list>, memory <list>, time <list>, gc <list>