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

Manuel Quiñones manuq at laptop.org
Fri Mar 28 09:02:27 EDT 2014


2014-03-28 9:44 GMT-03:00 Gonzalo Odiard <godiard at sugarlabs.org>:
>
>
>
> On Fri, Mar 28, 2014 at 9:38 AM, Tony Anderson <tony_anderson at usa.net>
> wrote:
>>
>> It is easier for users to understand shutting down the laptop by pressing
>> the power button twice than to use the shutdown in the XO menu. However,
>> this shutdown does not properly close open activities.
>>
>> When the power light goes red, I would assume it would be possible to
>> perform an orderly shutdown.
>>
>> The record is of an activity session so maintaining a list of session
>> information seems logical.
>>
>> One option is to record the launch time in the stop time at launch so that
>> the metadata shows that a an activity session was started but not properly
>> closed.
>
>
> 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}


>
> Gonzalo
>
>
>>
>>
>> Tony
>>
>>
>> On 03/27/2014 09:45 PM, sugar-devel-request at lists.sugarlabs.org wrote:
>>>
>>> I was in doubt for two reasons: 1. because unlike launch_time, this
>>> spent-times metadata will not be saved if the activity does not end
>>> properly: could be a crash, a programming error, end of battery, etc.
>>> So the item N of spent-times will not necessarily correspont to item N
>>> of launch-times.
>>
>>
>> _______________________________________________
>> Sugar-devel mailing list
>> Sugar-devel at lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
>
>
> --
> Gonzalo Odiard
>
> SugarLabs - Learning Software for children
>
> _______________________________________________
> 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