time: Human-Readable Time Measurement

Description Usage Arguments Value Author(s) Examples

Description

Functions and methods for extracting and printing timings in human-readable format.

Usage

1
2
3
4
5
6
as.human(x, fmt = "%.2f")
human.time(expr, print = TRUE, ...)
## S3 method for class 'gnn_GNN'
time(x, human = FALSE, ...)
## S3 method for class 'gnn_proc_time'
print(x, ...)

Arguments

x
as.human()

object of class "proc_time" as returned by system.time().

time.gnn_GNN()

object of class "gnn_GNN".

print.gnn_proc_time()

object of class "gnn_proc_time" as returned by time().

fmt

format string as required by sprintf().

expr

see system.time().

print

logical indicating whether to print the result; either way, it is returned (invisibly if print = TRUE).

human

logical indicating whether the result is to be returned in human-readable format.

...

for human.time() and time.gnn_GNN() additional arguments passed to the underlying as.human(); unused for print.gnn_proc_time().

Value

as.human(), human.time()

named character(3) providing user, system and elapsed time in human-readable format.

time.gnn_GNN()

object of class "gnn_proc_time".

print.gnn_proc_time()

x (invisibly).

Author(s)

Marius Hofert

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
if(TensorFlow_available()) { # rather restrictive (due to R-Forge, winbuilder)
library(gnn) # for being standalone

human.time(Sys.sleep(0.1)) # print human-readable time
(proc.obj <- human.time(Sys.sleep(0.1), print = FALSE)) # save the timing (character(3))
fnn <- FNN()
time(fnn) # default print method for objects of class "gnn_proc_time"
time(fnn, human = TRUE) # human-readable print method for such objects

}

gnn documentation built on Sept. 20, 2021, 5:13 p.m.

Related to time in gnn...