I know this is not what you asked but is the Uptime() UDF not an option?
_________________________
Common sense isn't so common.