質問編集履歴

2

追記

2019/09/26 11:59

投稿

JanTh1989
JanTh1989

スコア87

test CHANGED
File without changes
test CHANGED
@@ -79,3 +79,11 @@
79
79
  uint64_t diff = nmsec - omsec;
80
80
 
81
81
  ```
82
+
83
+
84
+
85
+ ## 開発環境
86
+
87
+ OS:Windows10
88
+
89
+ ツール:Visual Studio2010 Professional

1

追記

2019/09/26 11:59

投稿

JanTh1989
JanTh1989

スコア87

test CHANGED
File without changes
test CHANGED
@@ -7,6 +7,8 @@
7
7
 
8
8
 
9
9
  ```C++
10
+
11
+ // 構造体
10
12
 
11
13
  struct STDATE
12
14
 
@@ -29,3 +31,51 @@
29
31
  };
30
32
 
31
33
  ```
34
+
35
+
36
+
37
+ ```C++
38
+
39
+ //ミリ秒変換サンプル
40
+
41
+ STDATE odate = 先データファイル読み込み;
42
+
43
+ STDATE ndate = 後データファイル読み込み;
44
+
45
+ uint64_t omsec = 0;
46
+
47
+ omsec += odate.Year * 12 * 31 * 24 * 60 * 60 * 1000
48
+
49
+ omsec += odate.Month * 31 * 24 * 60 * 60 * 1000
50
+
51
+ omsec += odate.Day * 24 * 60 * 60 * 1000
52
+
53
+ omsec += odate.Hour * 60 * 60 * 1000
54
+
55
+ omsec += odate.Minutes * 60 * 1000
56
+
57
+ omsec += odate.secounds * 1000;
58
+
59
+ omsec += odate.Millisecounds;
60
+
61
+ uint64_t nmsec = 0;
62
+
63
+ omsec += ndate.Year * 12 * 31 * 24 * 60 * 60 * 1000
64
+
65
+ omsec += ndate.Month * 31 * 24 * 60 * 60 * 1000
66
+
67
+ omsec += ndate.Day * 24 * 60 * 60 * 1000
68
+
69
+ omsec += ndate.Hour * 60 * 60 * 1000
70
+
71
+ omsec += ndate.Minutes * 60 * 1000
72
+
73
+ omsec += ndate.secounds * 1000;
74
+
75
+ omsec += ndate.Millisecounds;
76
+
77
+
78
+
79
+ uint64_t diff = nmsec - omsec;
80
+
81
+ ```