Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Everything / time

Time

time

Great Reads

by Suresh Dasari's
Auto Generate Code (CRUD) for 3 Layered architecture (Entity, Data Access & Business Layer) with Stored Procedures based on table design.
by mkowlowitz
5 F-A-Qs regarding project management and project management software
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 clock that uses multiple Internet services to detect your weather, date and time

Latest Articles

by Suresh Dasari's
Auto Generate Code (CRUD) for 3 Layered architecture (Entity, Data Access & Business Layer) with Stored Procedures based on table design.
by mkowlowitz
5 F-A-Qs regarding project management and project management software
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 clock that uses multiple Internet services to detect your weather, date and time

All Articles

Sort by Score

time 

by Suresh Dasari's
Auto Generate Code (CRUD) for 3 Layered architecture (Entity, Data Access & Business Layer) with Stored Procedures based on table design.
by honey the codewitch
std::chrono doesn't work on the Teensy? Oh no! Here's how to fix it.
by Jani Giannoudis
Calculate the number of whole working days between start and end with support of holidays and holiday-periods.
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 =...
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...
by Kanasz Robert
How To Measure execution time in C#
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...
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...
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 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...
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...
by hagerAly
Techniques to achieve real time web development
by TymekMM
Easy way to measure execution time of the code block
by Jani Giannoudis
Show a TimeSpan by calendar periods
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. ...
by Eugen Podsypalnikov
A workaround to convert UTC to the LocalTime, in summer but without DST flag