Name

systime

Synopsis

systime() {G}

Return a time-of-day value in seconds since Midnight, January 1, 1970, UTC.

Example

Log the start and end times of a data-processing program:

    BEGIN {
            now = systime()
            mesg = strftime("Started at %Y-%m-%d %H:%M:%S", now)
            print mesg
    }
    process data ...
    END {
            now = systime()
            mesg = strftime("Ended at %Y-%m-%d %H:%M:%S", now)
            print mesg
    }

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.