Re: [Gems-users] problem with "g_eventQueue_ptr->getTime()".


Date: Sat, 23 May 2009 00:55:10 -0500
From: Dan Gibson <degibson@xxxxxxxx>
Subject: Re: [Gems-users] problem with "g_eventQueue_ptr->getTime()".
Logical time does not proceed unless events are processed in the event queue, for instance via a call to TriggerEvents(). Logical time, ala the event queue's GetTime() function, is totally unrelated to the passage of physical time, ala time() and sleep().

Regards,
Dan

2009/5/22 lenglihello <lenglihello@xxxxxxx>
thanks Dan, but why every time I get from "getTime()" is the same value?
 
 
2009-05-23

lenglihello

发件人: Dan Gibson
发送时间: 2009-05-23  00:14:09
收件人: Gems Users
抄送:
主题: Re: [Gems-users] problem with "g_eventQueue_ptr->getTime()".
getTime() returns the current simulated time. If you want physical time, there are many functions available on Linux hosts to do that. Try 'man time' to get started.

Regards,
Dan

2009/5/22 lenglihello <lenglihello@xxxxxxx>
hi,
I was confused by a problem with "g_eventQueue_ptr->getTime()".
***************************
Time t=g_eventQueue_ptr->getTime();
while(true)
{
t = g_eventQueue_ptr->getTime();
cout<<t<<endl;
sleep(50);
}
*************************
the result I got is as fallowing:
****************
2812755
2812755
2812755
......
***************
What should I do, if I want to get the time under simulation
 Any help will be aggreciated!
 
PS: hrtime_t can not be accepted in linux
2009-05-22

lenglihello

_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/" to your search.





--
http://www.cs.wisc.edu/~gibson [esc]:wq!

_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/" to your search.





--
http://www.cs.wisc.edu/~gibson [esc]:wq!
[← Prev in Thread] Current Thread [Next in Thread→]