Public Function TimeFormat(value As Long) As String '100ナノ秒単位にそろえる。ミリ→マイクロ→ナノ Dim span As New TimeSpan(value * 10 * 1000 * 10) Return span.ToString End Function
Public Function TimeFormat3(value As Long) As String '100ナノ秒単位にそろえる。ミリ→マイクロ→ナノ Dim span As New TimeSpan(value * 10 * 1000 * 10) Dim hour As String = span.Hours.ToString Dim minute As String = span.Minutes.ToString("00") Dim second As String = span.Seconds.ToString("00") Dim millisecond As String = span.Milliseconds.ToString Return hour & ":" & minute & ":" & second & "." & millisecond End Function