LCDatetime の Copy メソッド

このメソッドは、LCDatetime オブジェクトのコピーを作成します。

定義位置

LCDatetime

構文

Set newDatetime = srcDatetime.Copy

パラメータ

パラメータ

説明

srcDatetime

LCDatetime。コピーする日時オブジェクトです。

戻り値

説明

newDatetime

LCDatetime。srcDatetime オブジェクトのコピーです。

Option Public
Uselsx "*lsxlc"  
Sub Initialize
  Dim session As New LCSession
     ' In an LEI Scripted Agent, use the following syntax instead:
     ' Dim session As New LCSession ("mySession")
  Dim StopTime As New LCDateTime
  Dim StartTime As LCDatetime
  StopTime.SetCurrent
  Set StartTime = StopTime.Copy
  session.Sleep (100)  ' 100 milliseconds
  StopTime.SetCurrent
  Print "The difference between start and stop is:"
  Print StopTime.GetDiff (StartTime, LCDTUNIT_HUNDREDTH) & _
  " hundredths of a second."
End Sub

出力例

The difference between start and stop is:
10 hundredths of a second