Get current time
using System;
class MainClass {
public static void Main() {
string t;
int seconds;
DateTime dt = DateTime.Now;
seconds = dt.Second;
// update time if seconds change
if(seconds != dt.Second) {
seconds = dt.Second;
t = dt.ToString("T");
Console.WriteLine(t);
}
}
}
|
HTML code for linking to this page:
Related in same category :
-
|