We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e113b9 commit a474c1aCopy full SHA for a474c1a
1 file changed
src/node_file.cc
@@ -71,9 +71,6 @@ using v8::Value;
71
72
#define GET_OFFSET(a) ((a)->IsNumber() ? (a)->IntegerValue() : -1)
73
74
-#define MILLISEC_PER_SEC 1000
75
-#define NANOSEC_PER_MILLISEC 1000000
76
-
77
class FSReqWrap: public ReqWrap<uv_fs_t> {
78
public:
79
enum Ownership { COPY, MOVE };
@@ -479,8 +476,8 @@ void FillStatsArray(double* fields, const uv_stat_t* s) {
479
476
#endif
480
477
// Dates.
481
478
#define X(idx, name) \
482
- fields[idx] = (static_cast<double>(s->st_##name.tv_sec) * MILLISEC_PER_SEC) + \
483
- (static_cast<double>(s->st_##name.tv_nsec) / NANOSEC_PER_MILLISEC);\
+ fields[idx] = (s->st_##name.tv_sec * 1e3) + \
+ (s->st_##name.tv_nsec / 1e6); \
484
485
X(10, atim)
486
X(11, mtim)
0 commit comments