Create TimeSpan that represents a specified number of milliseconds in CSharp
Description
The following code shows how to create TimeSpan that represents a specified number of milliseconds.
Example
using System;/*from ww w . ja v a 2s.c o m*/
class MainClass
{
static void Main( )
{
TimeSpan interval = TimeSpan.FromMilliseconds( 6 );
string timeInterval = interval.ToString( );
Console.WriteLine( timeInterval );
}
}
The code above generates the following result.