$epochtime  –  Seconds and Nanoseconds Since the Epoch

$epochtime is an array of two elements and contains the seconds since the epoch and the remainder of nanoseconds. Both values should be retrieved or copied at the same time to ensure consistent results.

Examples

Print seconds and nanoseconds
1
2
zmodload zsh/datetime
echo $EPOCHSECONDS
BashSupport Pro is a Zsh IDE with support for $epochtimetry it now!
© 2020–2024 Joachim Ansorg
Imprint
Privacy Policy
Legal