1.
TextBox1.Text = DateTime.Now.ToShortTimeString '오후 12:54
TextBox1.Text = DateTime.Now.ToLongTimeString '오후 12:54:30
2.
Dim oldTime As DateTime
oldTime = DateTime.Now
While True
Dim millis = (DateTime.Now - oldTime).TotalMilliseconds
Console.WriteLine("millis:" & millis)
If millis > 1000 * 5 Then '5초가 지나면
Exit While
End If
Thread.Sleep(TimeSpan.FromMilliseconds(100))
End While
TextBox1.Text = "end."
댓글 없음:
댓글 쓰기