Here's something that may get you started. I assume you are running awk under windows since you mention a DOS window, and this solution relies on the unix date command. You can get it by installing cygwin. I renamed it udate because it is later in my path than the dos date function.
BEGIN{
dat = "udate +%T"
dat | getline
close(dat)
split($0,a,":"
secs = a[1]*3600 + a[2]*60 + a[3]
# print a[1],a[2],a[3],secs
}
{
# <your program>
}
END {
dat | getline
close(dat)
split($0,a,":"
# print a[1],a[2],a[3]
print "Elapsed time = " a[1]*3600 + a[2]*60 + a[3] - secs
}
CaKiwi
"I love mankind, it's people I can't stand" - Linus Van Pelt
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.