Display date and time on console (QNX)
clock [-b color] [-f color] [-s] [-u] [+format]
The clock utility maintains a display of the date and time in the top right corner of your console display. This utility automatically adjusts its priority to level 1 so that it doesn't compete with other processes.
With the exception of the -b color, -f color and -s options, clock works much like the date utility-both let you format the date and time with the same +format option. (For information on using this option, see date.)
To set the date and time at the system level, use the date utility. To transfer the system time to the battery backed-up hardware clock and vice-versa, use the rtc utility.
The clock utility is a link to date. Since clock writes directly to video memory, it may be run only by root. |
Display the clock in bright cyan on blue:
clock -f bcyan -b blue &
Display the clock in green on black, in 24-hour format:
clock -f green "+%X" &
Some machines have problems doing DMA (e.g. floppy I/O) while video memory is being accessed. If you are running into problems with this the -s option may be used to make video updates less frequent. When -s is not used, clock will update the screen once per "tick" (typically 100 times per second). Be aware that other video updates may cause a problem (windows, console writes) and that you are taking a chance with your data if you use such hardware.