[Sugar-devel] Time spent on activity (was Best time, format for logging?)

Manuel Quiñones manuq at laptop.org
Fri Mar 28 10:19:55 EDT 2014


2014-03-28 10:12 GMT-03:00 Gonzalo Odiard <godiard at sugarlabs.org>:
>>
>> >
>> > I like that. Save in zero at start, then every write_file just need
>> > replace
>> > the last value.
>>
>> what about something like:
>>
>> {start: 1396011589, stops: [1396011616, 1396045612]}
>>
>> an activity that was inappropriately closed and never logged a stop:
>>
>> {start: 1396011589}
>>
>>
>
> IMHO, you want one stop for session. Sugar execute write_file every time
> you switch activities, but you don't want save all of them, just the last.
>
> Right now, you have:
>
> {launch_time: 1396011589, 1396011616, 1396045612}
>
> If you save the accumulated time in zero at start you will have:
>
> {session_time: 23960, 0, 5612}
>
> Where 0 is a session not saved, for any reason.

good point! we could also put 'undefined'.  (thinking in JSON format,
as we store a string)

>
> Gonzalo
>
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>



-- 
.. manuq ..


More information about the Sugar-devel mailing list