From: John O. <joh...@gm...> - 2007-09-12 13:09:18
|
sorry it took awhile but been busy. Here it is( http://www.nabble.com/file/p12634944/timestampPatch timestampPatch ), you should be able to apply it by: patch -p0 < timestampPatch from the directory above the javaclient2 directory. thanks John Radu Bogdan Rusu-2 wrote: > > Thanks John. Could you generate a patch against SVN ? I could commit it to > the official > repository afterwards. > > Cheers, > Radu. > > John Oliver wrote: >> I did something similar not long ago: >> >> Each header does come with a time stamp since the start of the >> simulation, >> my solution was to simply record the most recent time stamp. The best >> position to do this seems to be in "read (int interf, int index)" in >> PlayerClient.java, after the line: >> >> header = readHeader (); >> >> you could add something like: >> >> if(header.getTimestamp()>currentTime) >> { >> currentTime = header.getTimestamp(); >> } >> >> then a getter method on currentTime in PlayerClient would allow you to >> get >> the latest time. >> >> I have attached my version of >> http://www.nabble.com/file/p12410309/PlayerClient.java PlayerClient.java >> . >> Its not exactly the most eligent way of doing this since PlayerClient >> shouldnt realy be storing this type of information but it works. >> >> Let me know if you have any problems >> >> Thanks >> >> John >> >> >> >> >> sarahb-2 wrote: >>> >>> >>> I am developing a simulation using Stage and have run into a problem. >>> With >>> the old C++ client, it was very easy to get the simulation time. >>> However, >>> I >>> can't seem to find a way to get the time since start of simulation using >>> the >>> JavaClient. >>> >>> If there is a way, does anyone know what it is? If not, can anyone >>> point >>> me >>> in the right direction on how to add this feature to the JavaClient? >>> >>> Thanks for any help. >>> >>> Sarah >>> >>> ------------------------------------------------------------------------- >>> This SF.net email is sponsored by: Splunk Inc. >>> Still grepping through log files to find problems? Stop. >>> Now Search log events and configuration files using AJAX and a browser. >>> Download your FREE copy of Splunk now >> http://get.splunk.com/ >>> _______________________________________________ >>> Java-player-users mailing list >>> Jav...@li... >>> https://lists.sourceforge.net/lists/listinfo/java-player-users >>> >>> >> > > -- > | Radu Bogdan Rusu | http://rbrusu.com/ > | http://www9.cs.tum.edu/people/rusu/ > | Intelligent Autonomous Systems > | Technische Universitaet Muenchen > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Java-player-users mailing list > Jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-player-users > > -- View this message in context: http://www.nabble.com/simulation-clock-tf4345003.html#a12634944 Sent from the java-player-users mailing list archive at Nabble.com. |