Click here to Skip to main content
15,883,905 members
Everything / Time

Time

time

Great Reads

by Graham Wilson
An exercise to measure the drift in the time-of-day clock on a Windows PC using the periodic timer
by honey the codewitch
Create a simple synchronized analog clock using GFX, and a bit of code
by Keith Barrow
If you have a Winforms application that auto loads data, there is no doubt that you’ll have come across the problem of data loading at design time (i.e. when opening the code in the designer). At best, this slows the designer down, at worst it might crash VS and prevent the control from...
by honey the codewitch
std::chrono doesn't work on the Teensy? Oh no! Here's how to fix it.

Latest Articles

by honey the codewitch
Just a clock with snazzy digits that syncs using NTP and gets your timezone from your IP.
by honey the codewitch
std::chrono doesn't work on the Teensy? Oh no! Here's how to fix it.
by honey the codewitch
Create a clock that uses multiple Internet services to detect your weather, date and time
by honey the codewitch
Create a simple synchronized analog clock using GFX, and a bit of code

All Articles

Sort by Score

Time 

28 Apr 2010 by Keith Barrow
If you have a Winforms application that auto loads data, there is no doubt that you’ll have come across the problem of data loading at design time (i.e. when opening the code in the designer). At best, this slows the designer down, at worst it might crash VS and prevent the control from...
24 Aug 2022 by honey the codewitch
std::chrono doesn't work on the Teensy? Oh no! Here's how to fix it.
20 Feb 2012 by ZC123456
As a developer who has spent a fair amount of time tweaking code for performance optimization, I'm having some issues with this article.First of all, who has generally accepted 10M iterations to test the performance? Unless your native code happens to be calling a function thousands or...
18 Feb 2010 by Ron Beyer
If you are designing in a WinForms component, which is anything that derives from Control at some point (Forms, UserControls, panels, etc), then you can use the following code:if (this.Site.DesignMode) //Do stuff[edit]The above will throw an exception if Site is not set (in...
17 Feb 2010 by Alaric Dailey
One thing that annoys me is huge companies that ignore time issues. Several of my clients have had huge networks across multiple timezones, and they wondered why logging times in the database were always off, everyone was logging in their local time, making it impossible to correlate logs. ...
28 Mar 2011 by Jani Giannoudis
Show a TimeSpan by calendar periods
6 Oct 2011 by Go Cova
public static int GetFullWorkingDaysBetween(DateTime firstDate, DateTime lastDate, IEnumerable holidays){ if (firstDate > lastDate)// Swap the dates if firstDate > lastDate { DateTime tempDate = firstDate; firstDate = lastDate; lastDate =...
4 Jul 2012 by Eugen Podsypalnikov
A workaround to convert UTC to the LocalTime, in summer but without DST flag
1 Mar 2011 by Kanasz Robert
How To Measure execution time in C#
20 Feb 2010 by tonyt
Either method is good for testing if you are in the designer, but another problem aside from preventing code execution, is preventing code from being jitted in the Designer. For example, you may reference assemblies or components that are dependent on native code, which cannot be loaded into any...
3 Nov 2013 by hagerAly
Techniques to achieve real time web development
23 Sep 2020 by TymekMM
Easy way to measure execution time of the code block
12 Dec 2016 by Suresh Dasari's
Auto Generate Code (CRUD) for 3 Layered architecture (Entity, Data Access & Business Layer) with Stored Procedures based on table design.
25 Mar 2011 by Jani Giannoudis
Calculate the number of whole working days between start and end with support of holidays and holiday-periods.
9 Mar 2011 by spot9969
Please try this method to get execution time. I'm not sure that it is very accurate.public static TimeSpan GetDuration(Stopwatch sw, ThreadStart method){ sw.Reset(); sw.Start(); method(); sw.Stop(); return sw.Elapsed;}you can put it into any common static class and use as...
26 Feb 2011 by Member 7709321
Here is a useful generic class you can directly use in your project.public class Timer{ public static readonly bool IsHighPerformance; [DllImport("Kernel32.dll")] private static extern bool QueryPerformanceCounter(out long lpPerformanceCount); //Retrieves the current...