accudate - shows dates or elapsed times to the millisecond
accudate emits time and date related information with more accuracy than the standard date program. This information is written to stdout. It may be used to create time stamps or to measure elapsed times. Times are shown down to the millisecond but since the program itself requires finite time to run output may not be significant to the final digit.
accudate may be obtained as part of the drm_tools package from: http://sourceforge.net/projects/drmtools/
[none] write time as YYYY-MM-DD:hh:mm:ss.lll to stdout. This fixed width, fixed field, format is easily sorted or parsed. The numeric fields are: YYYY year MM month DD day of the month hh hours (24 hour clock) mm minutes ss seconds lll milliseconds
-s Write time instead as YYYY-MM-DD hh:mm:ss.lll to stdout.
-touch Write time instead as YYYYMMDDhhmm.ss to stdout. For use with the Unix touch program.
-toff <seconds> Add <seconds> to the current time before emitting it. This value may be positive or negative. Common offsets are:hour=3600, day=86400, week=604800, year (365 days)=1536000. WARNING: consider leap years, daylight savings, time zones, and so forth!
-t0 Write time as seconds microseconds to stdout. These values may then be fed back into the program later with the -df or -ds flags to show elapsed times.
-df <seconds microseconds> Write elapsed time as DDDD-hh:mm.ss.lll to stdout. The value of <seconds microseconds> having been previously generated using the -t0 flag. Use this format to time very long events, up to 9999 days.
-ds <seconds microseconds> Write elapsed time as ssssss.lll to stdout. The value of <seconds microseconds> having been previously generated using the -t0 flag. Use this format to time very short events.
-h -help --help -? --?? Print the help message. (Default - do not print help message.)
-i Emit version, copyright, license and contact information.( Default - do not emit information.)
% accudate -h List the the command line options.
% echo ‘accudate‘ message >>logfile Time stamp a log file with: 2002-12-12:09:56:01.123 message.
% STARTTIME=‘accudate -t0‘ % # other operations % echo ‘accudate -df $STARTTIME‘ message >>logfile Log elapsed time as: 0000-00:01.56.456 message
% STARTTIME=‘accudate -t0‘ % # other operations % echo ‘accudate -ds $STARTTIME‘ message >>logfile Log elapsed time as: 000016.456 message.
% STARTTIME=‘accudate -t0‘
% accudate -ds $STARTTIME
% accudate -ds $STARTTIME
% accudate -ds $STARTTIME Series of commands which may be used to estimate the smallest times which accudate can measure reliably.
% touch -t ‘accudate -toff -3600 -touch‘ filename Set the time on filename to one hour before the current time.
GNU General Public License 2
Copyright (C) 2002, 2003, 2004, 2005, 2006 David Mathog and Caltech.
David Mathog, Biology Division, Caltech <firstname.lastname@example.org>
|drm_tools||accudate (1)||1.0.7 OCT 23 2006|