summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.WP8/WinPhoneTicker.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Platform.WP8/WinPhoneTicker.cs')
-rw-r--r--Xamarin.Forms.Platform.WP8/WinPhoneTicker.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.WP8/WinPhoneTicker.cs b/Xamarin.Forms.Platform.WP8/WinPhoneTicker.cs
new file mode 100644
index 00000000..94b17246
--- /dev/null
+++ b/Xamarin.Forms.Platform.WP8/WinPhoneTicker.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Windows.Threading;
+
+namespace Xamarin.Forms
+{
+ internal class WinPhoneTicker : Ticker
+ {
+ readonly DispatcherTimer _timer;
+
+ public WinPhoneTicker()
+ {
+ _timer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(15) };
+ _timer.Tick += (sender, args) => SendSignals();
+ }
+
+ protected override void DisableTimer()
+ {
+ _timer.Stop();
+ }
+
+ protected override void EnableTimer()
+ {
+ _timer.Start();
+ }
+ }
+} \ No newline at end of file