Name

systime

Synopsis

systime(  ) {G}

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

Examples

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

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

Get Linux in a Nutshell, 6th 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.