Windows Phone 7.1 SDK Alarm
I'm trying to create an alarm using the new Alarm class in the Windows Phone 7.1 SDK
I'm able to get it to work but the al开发者_StackOverflowarm doesn't seem to be going off at the time i've set.
Alarm alarm = new Alarm("MyAlarm")
{
Content = "Alarm!",
BeginTime = DateTime.Now.AddSeconds(seconds),
};
ScheduledActionService.Add(alarm);
The remarks in MSDN say
The action will not be invoked before the begin time has been reached.
(emphasis mine)
There is no guarantee on the alarm being called at the exact second specified. I would expect there to be the possibility of the alarm being triggered up to a few seconds after the specified time, but not before.
精彩评论