Click here to Skip to main content
13,046,679 members (62,004 online)
Rate this:
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 11:26am
richcb 1-Apr-13 18:01pm
Point taken and agreed.
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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 1 Apr 2013
Copyright © CodeProject, 1999-2017
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