Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Time logging - able to turn off and on, see upon relog- - possible?

Karma Kohnke
Registered User
Join date: 18 Jun 2007
Posts: 3
09-05-2007 06:33
Basically I am looking for a stopwatch type of thing, something I can turn on to start logging my time (kind of like a time clock at work) and turn off.

BUT

I also need to be able to see that data if I crash when I log back in.

I need to track my hours somewhere on line and frequently crash while afk and have no idea when I crashed.

Is this out there, or even possible???

Thanks in advance.
Lyn Mimistrobell
(waiting)
Join date: 11 Jan 2007
Posts: 179
09-05-2007 06:54
Have a look at llRequestAgentData. It will tell if an agent is online or not. You can have use a timer event to check if you're online every minute for example, and IM you when you've gone offline (which you'd get in email or the next time you logon)... Ofcourse you can add more logging but this should get you started.

http://rpgstats.com/wiki/index.php?title=llRequestAgentData
RJ Source
Green Sky Labs
Join date: 10 Jan 2007
Posts: 272
09-05-2007 06:56
The approach that worked for me was to create an attachment, that had options like creating and selecting a project. When a project is selected, it sets a timer - I think I have it as at 60 seconds now - and every 60 seconds it adds 60 seconds to the time working under that project, and keeps track of the last time the timer went off (timestamp into a global).

That way, my tracking time is accurate to within around 60 seconds. And if I crash, the code can be checking the timestamp, and can tell I crashed if the last timestamp is way way different than the current time minus 60 seconds.
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
09-05-2007 07:07
No idea if such a thing is a product already, but it's certainly possible--assuming not too much precision is required.

If the device could be an attachment, it might just keep frequently updating a llGetUnixTime timestamp variable that it checks on_rez (when the agent comes back in-world), subtracting the start timestamp. (I see RJ already suggested this while I was typing.)

If it can't be attached, it would have to detect the agent's in-world presence by another means: if anywhere in-world counts, then the relatively expensive llRequestAgentData (as Lyn suggests) would be needed; if in-sim, the very cheap llGetAgentInfo; if some other space of radius 96m or less, llSensor which is of intermediate cost per call.

The more costly the agent-polling method needed, the less precise one should make the measurement (sampling rate).
Karma Kohnke
Registered User
Join date: 18 Jun 2007
Posts: 3
09-05-2007 07:24
Thanks already wow you guys are fast!! lol

Ok, now I have some research to do to help a script newbie like me figure out how to do this lol You guys have given me a great start though, thank you very much!

I don't need it to be incredibly precise, just able to figure out how many hours, and if I come back online to a crash, I can look and see when it happened so I can figure it out myself how long I had been logging.

Thanks so much!! I will look into the ideas and links given :)
Appreciate it :)