Hi guys

I have these function definitions and I'm supposed to write the functions. I have trouble understanding a part of it. I will explain.
Quote:
Opentimer
1 (vt_Time) Expiry time, relative to now, or VMS_UNSET to leave timer unset
return (vMSHnd) Handle to the new timer
Closetimer
1 (vMSHnd) Handle to the timer
return (vt_bool) TRUE = operation succeeded
IstimerExpired
1 (vMSHnd) Handle to the timer
return (vt_bool) TRUE = expired
Unsettimer
1 (vMSHnd) Handle to the timer
return (vt_bool) TRUE = operation succeeded
Resettimer
1 (vMSHnd) Handle to the timer
2 (vt_Time) see arg#1 for timerOpen(), if VMS_UNSET then behaves same as timerUnSet()
return (vt_bool) TRUE = operation succeeded
The create function is supposed to return a handle to a timer. I am not sure how I'm supposed to do that.

I am planning on creating a class and in the implementation of the create function, I will set a variable to current time (using gettickcount () ) and set the expiry variable to what's passed in. In the isExpired function, I will compare the values against current time (again using gettickcount () ) and determine if timer is expired or not.

But I don't know how to create a handle for each timer the way the function definitions require me to. Any ideas?

Thank you