--- name: time status: documented runtime: pp source: src/runtime/pp/time.rs --- ```{index} single: time; Perl built-in (pp runtime) ``` # time ## Synopsis ```perl my $now = time(); # e.g. 1704067200 my $core = CORE::time; # always integer, bypasses overrides # with: use Time::HiRes qw(time); my $hires = time(); # e.g. 1704067200.123456 ``` ## Description Returns the number of seconds since the Unix epoch. Returns the current time as a non-negative integer representing whole seconds elapsed since 1970-01-01 00:00:00 UTC (the Unix epoch). If `Time::HiRes::time` has been imported into the current package (overriding the builtin), this op dispatches to the high-resolution version which returns a floating-point value with microsecond precision. The `CORE::time` form (SPECIAL flag set) always uses the integer builtin, bypassing any override. ## See also localtime, gmtime, Time::HiRes