T3D - Post Event Current time - Safer
by elvince · 05/24/2010 (11:51 pm) · 0 comments
In the Curl resource, it has been raised that the current postCurrentEvent can be more safer and this is the purpose of thi small resource.
in Sim.h
In fact, in you put -1, the getcurrentTime will be call in the postEvent function once the mutex lock has been done.
I hope this will help...
@Thanks to Manoel Neto for this feedback on the LibCurl thread.
in Sim.h
inline U32 postCurrentEvent(SimObject*obj, SimEvent*evt)
{
//return postEvent(obj,evt,getCurrentTime());
return postEvent(obj,evt,-1);
}
inline U32 postCurrentEvent(SimObjectId obj,SimEvent*evt)
{
//return postEvent(obj,evt,getCurrentTime());
return postEvent(obj,evt,-1);
}
inline U32 postCurrentEvent(const char *obj,SimEvent*evt)
{
//return postEvent(obj,evt,getCurrentTime());
return postEvent(obj,evt,-1);
}In fact, in you put -1, the getcurrentTime will be call in the postEvent function once the mutex lock has been done.
I hope this will help...
@Thanks to Manoel Neto for this feedback on the LibCurl thread.
About the author
