gc.time {base} | R Documentation

## Report Time Spent in Garbage Collection

### Description

This function reports the time spent in garbage collection so far in the R session while GC timing was enabled..

### Usage

    gc.time(on = TRUE)

### Arguments

`on` | logical; if `TRUE`, GC timing is enabled.

### Value

A numerical vector of length 5 giving the user CPU time, the system CPU time, the elapsed time and children's user and system CPU times (normally both zero).

### Warnings

This is experimental functionality, likely to be removed as soon as the next release.

The timings are rounded up by the sampling interval for timing processes, and so are likely to be over-estimates.

### Note

CPU times will be returned as `NA` on Windows 9x/ME systems, but are genuine times on NT4/2000/XP systems. Times of child processes are not available and will always be given as `NA`.

### See Also

`gc`, `proc.time` for the timings for the session.

### Examples

    gc.time()

[Package base version 2.3.1 Index]