summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--unix/tclUnixTime.c7
-rw-r--r--win/tclWinTime.c4
2 files changed, 6 insertions, 5 deletions
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c
index 94a666a..c44b10c 100644
--- a/unix/tclUnixTime.c
+++ b/unix/tclUnixTime.c
@@ -127,8 +127,8 @@ TclpGetClicks(void)
Tcl_Time time;
GetTime(&time);
- now = ((unsigned long long)(unsigned long) time.sec)*1000000 +
- time.usec;
+ now = ((unsigned long long)(time.sec)*1000000ULL) +
+ (unsigned long long)(time.usec);
} else {
/*
* A semi-NativeGetTime, specialized to clicks.
@@ -141,7 +141,8 @@ TclpGetClicks(void)
Tcl_Time time;
GetTime(&time);
- now = ((unsigned long long) time.sec)*1000000 + time.usec;
+ now = ((unsigned long long)(time.sec)*1000000ULL) +
+ (unsigned long long)(time.usec);
#endif /* NO_GETTOD */
return now;
diff --git a/win/tclWinTime.c b/win/tclWinTime.c
index c826840..15d9117 100644
--- a/win/tclWinTime.c
+++ b/win/tclWinTime.c
@@ -221,8 +221,8 @@ TclpGetClicks(void)
Tcl_Time now; /* Current Tcl time */
GetTime(&now);
- return ((unsigned long long)(unsigned long) now.sec * 1000000ULL) +
- now.usec;
+ return ((unsigned long long)(now.sec)*1000000ULL) +
+ (unsigned long long)(now.usec);
}
}