We do a fair amount of scripting in our validation and performance testing, and we often require time-related functions for our batch files on our Windows machines. These time-related functions can be divided into three categories: Display the date and/or time, Delay execution (wait) for a specified period of time, and Synchronize the clocks between machines.
Examples of all three are available at http://www.demartek.com/Demartek_lab_tips_time-related-scripting_2011-07-25.html along with other related links.