| Line 1... |
Line 1... |
| 1 |
% File src/library/base/man/system.time.Rd
|
1 |
% File src/library/base/man/system.time.Rd
|
| 2 |
% Part of the R package, https://www.R-project.org
|
2 |
% Part of the R package, https://www.R-project.org
|
| 3 |
% Copyright 1995-2020 R Core Team
|
3 |
% Copyright 1995-2020, 2022 R Core Team
|
| 4 |
% Distributed under GPL 2 or later
|
4 |
% Distributed under GPL 2 or later
|
| 5 |
|
5 |
|
| 6 |
\name{system.time}
|
6 |
\name{system.time}
|
| 7 |
\title{CPU Time Used}
|
7 |
\title{CPU Time Used}
|
| 8 |
\usage{
|
8 |
\usage{
|
| Line 20... |
Line 20... |
| 20 |
\code{system.time} calls the function \code{\link{proc.time}},
|
20 |
\code{system.time} calls the function \code{\link{proc.time}},
|
| 21 |
evaluates \code{expr}, and then calls \code{proc.time} once more,
|
21 |
evaluates \code{expr}, and then calls \code{proc.time} once more,
|
| 22 |
returning the difference between the two \code{proc.time} calls.
|
22 |
returning the difference between the two \code{proc.time} calls.
|
| 23 |
|
23 |
|
| 24 |
\code{unix.time} has been an alias of \code{system.time}, for
|
24 |
\code{unix.time} has been an alias of \code{system.time}, for
|
| 25 |
compatibility with S, and has finally been deprecated in 2016.
|
25 |
compatibility with S, has been deprecated in 2016 and finally became
|
| - |
|
26 |
defunct in 2022.
|
| 26 |
|
27 |
|
| 27 |
Timings of evaluations of the same expression can vary considerably
|
28 |
Timings of evaluations of the same expression can vary considerably
|
| 28 |
depending on whether the evaluation triggers a garbage collection. When
|
29 |
depending on whether the evaluation triggers a garbage collection. When
|
| 29 |
\code{gcFirst} is \code{TRUE} a garbage collection (\code{\link{gc}})
|
30 |
\code{gcFirst} is \code{TRUE} a garbage collection (\code{\link{gc}})
|
| 30 |
will be performed immediately before the evaluation of \code{expr}.
|
31 |
will be performed immediately before the evaluation of \code{expr}.
|