1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

c++ builder XE4, 10.2 Tokyo > TDateTime > ミリ秒 (msec) まで表示 > Now().FormatString(L"yyyy/mm/dd hh:nn:ss.zzz")

Last updated at Posted at 2015-10-05
動作確認
C++ Builder XE4
Rad Studio 10.2 Tokyo Update 2 (追記: 2017/12/26)

ミリ秒の処理の計測をするのに以下を使っていた。

WORD start = GetTickCount();
WORD elapsed;

// 処理...

elapsed = GetTickCount() - start;

TDateTimeのFormatStringでミリ秒まで表示できないかと思って調べた。

OutputDebugString(Now().FormatString(L"yyyy/mm/dd hh:nn:ss.zzz").c_str());
結果
デバッグ出力:2015/10/05 10:09:28.324 

上記の .324 がミリ秒。

上記のデバッグ出力を処理前と処理後で実行することで、だいたいの処理時間がわかる。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?