开发者

Windows Phone 7.1 SDK Alarm

开发者 https://www.devze.com 2023-03-20 01:29 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号