accudate - shows dates or elapsed times to the millisecond.
Synopsis
Description
Options
Examples
See Also
License
Copyright
Acknowledgements
Authors
accudate [ -h -? -help --help --? ]
accudate [options...]
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 from:
ftp://saf.bio.caltech.edu/pub/software/linux_or_unix_tools/
Use of accudate is subject to the License terms.This document describes accudate version 1.0.5 of 01-NOV-2004.
[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, 1year (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 -hList the the command line options.
% echo `accudate` "message" >>logfileTime stamp a log file with: 2002-12-12:09:56:01.123 message.
% STARTTIME=`accudate -t0`
% other operations
% echo `accudate -df $STARTTIME` "message" >>logfileLog elapsed time as: 0000-00:01.56.456 message.
% STARTTIME=`accudate -t0`
% other operations
% echo `accudate -ds $STARTTIME` "message" >>logfileLog elapsed time as: 000016.456 message.
% STARTTIME=`accudate -t0`
% accudate -ds $STARTTIME % accudate -ds $STARTTIME % accudate -ds $STARTTIMESeries of commands which may be used to estimate the smallest times which accudate can reliably measure.
% touch -t `accudate -toff -3600 -touch` filenameSet the time on filename to one hour before the current time.
none
You may run this program on any platform. You may redistribute the source code of this program subject to the condition that you do not first modify it in any way. You may distribute binary versions of this program so long as they were compiled from unmodified source code. There is no charge for using this software. You may not charge others for the use of this software.
Copyright (C) 2002, 2003, 2004 David Mathog and Caltech.
none
David Mathog, Biology Division, Caltech <mathog@caltech.edu>
| accudate (1) | 01 Nov 2004 |