DateAndTime.Timer プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DateAndTime.Timer プロパティの意味・解説 

DateAndTime.Timer プロパティ

午前 0 時からの経過時間を秒数を表す Double 値を返します。

名前空間: Microsoft.VisualBasic
アセンブリ: Microsoft.VisualBasic (microsoft.visualbasic.dll 内)
構文構文

解説解説
使用例使用例

この例では、Timer プロパティを使用してアプリケーションを中断しています。中断中には他の処理を実行できます。

Public Sub waitFiveSeconds()
    If TimeOfDay >= #11:59:55 PM# Then
        MsgBox("The current time is within 5 seconds of midnight"
 & _
            vbCrLf & "The timer returns to 0.0 at midnight")
        Return
    End If
    Dim start, finish, totalTime As Double
    If (MsgBox("Press Yes to pause for 5 seconds",
 MsgBoxStyle.YesNo)) _
        = MsgBoxResult.Yes Then
        start = Microsoft.VisualBasic.DateAndTime.Timer
        ' Set end time for 5-second duration.
        finish = start + 5.0
        Do While Microsoft.VisualBasic.DateAndTime.Timer
 < finish
        ' Do other processing while waiting for 5 seconds to elapse.
        Loop
        totalTime = Microsoft.VisualBasic.DateAndTime.Timer - start
        MsgBox("Paused for " & totalTime &
 " seconds")
    End If
End Sub

Timer は System.Threading, System.Timers 名前空間と System.Windows.Forms 名前空間でも定義されるクラスであるため、Timer プロパティを Microsoft.VisualBasic 名前空間を使用して完全修飾する必要があります。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

DateAndTime.Timer プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



DateAndTime.Timer プロパティのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS