Click here to Skip to main content
11,484,162 members (68,884 online)
Rate this: bad
Please Sign up or sign in to vote.
I am needing help creating a WPF application where the user schedules a DATE in the future and a TIME in the future to where it will then call some method or do something else like go invisible. I am not concerned with what it does after the interval is set. I have all the needed functionality except for how to keep track of the time interval set by the user. I use the calendar tool to retrieve the user data. I created my own time picker for the user to pick the time. Now I just need a way of measuring that time and date against the system clock to then do something. Everything that I have read says to use the Dispatcher class to keep track of time. Is there another class? Or is there a better way in WPF to do this?
Posted 1-Apr-13 12:26pm
richcb at 1-Apr-13 18:01pm
Point taken and agreed.
Sergey Alexandrovich Kryukov at 2-Apr-13 10:50am
The inquirer's account was deactivated due to extreme rudeness, as a result of abuse reports.
I removed all comments.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

No, if you simply need to track elapsed "real" time, use System.Diagnostics.Stopwatch:[^].

This is the most accurate way of measuring time available.

As I cannot be sure I really can understand the scenario and the ultimate purpose of it from this question, this is just a suggestion. It's not clear what is is meant by "tracking". Anyway, it's important to know the best way of measuring elapsed time, for whatever reason.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 210
1 Frankie-C 155
2 Raje_ 155
3 OriginalGriff 147
4 Maciej Los 110
0 Sergey Alexandrovich Kryukov 8,489
1 OriginalGriff 7,943
2 Sascha Lefèvre 3,114
3 Maciej Los 2,581
4 Richard Deeming 2,370

Advertise | Privacy | Mobile
Web04 | 2.8.150520.1 | Last Updated 1 Apr 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100