Is there an easy way to determine the time in ticks, using date between now and some time tomorrow.
Off the top of my head - I'd look at the UNIX def of "Epoch Time", figure out the begin and end epoch times of interest, subtract, and then scale that to whatever.
Now, about your specific question about using the DATE(1) command, the UNIX man page for DATE(1) in the BSD General Commands Manual has this example:
On my OSX system, I get:
Here is another approach that may work for you...
Another possibile implementation to accomplish what you are trying to do would be with the UNIX
First, on OSX, the
Then, I did a sleep test as follows:
at this point, I put my OSX laptop to sleep, went in the kitchen and made a salad, came back, and here's the results:
So, it may be possible that the implementation of your particular
You have to be really careful when using kernel time structures (ticks and jiffies were meant to be used only by the scheduler for multitasking and internal kernel processes) .
Linux uses jiffies, not ticks (Windows, Unix and the BSDs use ticks), and the amount of time varies per the architecture. On an x86 or AMD64 platform, Linux has 100 Jiffies per second (by default, this can be changed). Also, there's no guarantee that a Jiffy is exactly 10ms, various factors can change it by a little bit each time, and eventually this can add up to a meaningful difference.
Getting more complicated, the latest kernels are tickless, their kernels do not "wake up" on a regular interval to do multitasking and all that. Instead each time a "wake up" is done, the kernel figures out when it needs to wake up next and schedules an interrupt timer to fire at that time. On these systems there's no such thing as a tick or jiffy with a consistent time allocation.