C# TicksPer constants


TicksPer constants in C# have TicksPerDay, TicksPerHour, TicksPerMinute, TicksPerSecond, and TicksPerMillisecond constants. A millisecond consists of 10,000 ticks.

Here are the TicksPer constants −

TimeSpan.TicksPerDay
TimeSpan.TicksPerHour
TimeSpan.TicksPerMinute

Example

 Live Demo

using System;
using System.Linq;
public class Demo {
   public static void Main() {
      // TicksPer constant
      Console.WriteLine(TimeSpan.TicksPerDay);
      Console.WriteLine(TimeSpan.TicksPerHour);
      Console.WriteLine(TimeSpan.TicksPerMinute);
   }
}

Output

864000000000
36000000000
600000000

Updated on: 22-Jun-2020

166 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements