2014-03-28 10:12 GMT-03:00 Gonzalo Odiard <godi...@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@lists.sugarlabs.org > http://lists.sugarlabs.org/listinfo/sugar-devel > -- .. manuq .. _______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel