Merge branch 'patch-2' of https://github.com/richinseattle/llama2.c into richinseattle-patch-2

This commit is contained in:
Andrej Karpathy
2023-07-27 05:23:05 +00:00
+4
View File
@@ -364,6 +364,7 @@ int argmax(float* v, int n) {
// ----------------------------------------------------------------------------
long time_in_ms() {
#ifndef _WIN32
struct timespec time;
// Get the current time with nanosecond precision
if (clock_gettime(CLOCK_REALTIME, &time) == 0) {
@@ -372,6 +373,9 @@ long time_in_ms() {
perror("clock_gettime");
return -1; // Return -1 to indicate an error
}
#else
return GetTickCount();
#endif
}
int main(int argc, char *argv[]) {