[maemo-developers] Alarm API: Recurrence

From: Murray Cumming murrayc at murrayc.com
Date: Tue Jul 24 21:26:09 EEST 2007
The alarm_event_t::alarm_time time_t seems to want an actual time in the future.
For instance, see set_alarm() here: 
https://stage.maemo.org/viewcvs.cgi/projects/tools/trunk/maemo_testing/maemo-examples/example_alarm.c?root=maemo&view=markup
which does
	/* Get current time and add two seconds to it,
	 * meaning that alarm should be sent at
	 * this time */
	time(&current_time);
	alarm_time = localtime(&current_time);
	alarm_time->tm_sec += 2;
	/* Set the alarm time */
	event.alarm_time = mktime(alarm_time);

So I think that the (wrongly formatted) documentation is wrong when it says that it is the 
"Number of minutes between each recurrence" here:
http://maemo.org/api_refs/3.0/alarm-api/structalarm__event__t.html

But if the alarm_time is an actual time, instead of an interval, how can the recurrence and recurrence_count fields work? 

-- 
Murray Cumming
murrayc at murrayc.com
www.murrayc.com
www.openismus.com


More information about the maemo-developers mailing list