Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/coreclr/dlls/mscordac/mscordac_unixexports.src
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ nativeStringResourceTable_mscorrc
#FormatMessageW
#FreeEnvironmentStringsW
#FreeLibrary
#FileTimeToSystemTime
#GetCurrentProcess
#GetCurrentProcessId
#GetCurrentThreadId
Expand All @@ -93,8 +92,6 @@ nativeStringResourceTable_mscorrc
#GetProcAddress
#GetStdHandle
#GetSystemInfo
#GetSystemTime
#GetSystemTimeAsFileTime
#GetTempPathA
#GetTempPathW
#LoadLibraryExA
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/inc/stresslog.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ class StressLog {
CRITSEC_COOKIE lock; // lock
uint64_t tickFrequency; // number of ticks per second
uint64_t startTimeStamp; // start time from when tick counter started
FILETIME startTime; // time the application started
uint64_t startTime; // time the application started in Windows FILETIME precision (100ns since 01 Jan 1601)
SIZE_T moduleOffset; // Used to compute format strings.
struct ModuleDesc
{
Expand Down
9 changes: 0 additions & 9 deletions src/coreclr/jit/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,6 @@ const BYTE genActualTypes[] = {
};

#endif // FEATURE_JIT_METHOD_PERF
/*****************************************************************************/
inline unsigned getCurTime()
{
SYSTEMTIME tim;

GetSystemTime(&tim);

return (((tim.wHour * 60) + tim.wMinute) * 60 + tim.wSecond) * 1000 + tim.wMilliseconds;
}

/*****************************************************************************/
#ifdef DEBUG
Expand Down
2 changes: 0 additions & 2 deletions src/coreclr/nativeaot/Runtime/Pal.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,6 @@ UInt32_BOOL PalResetEvent(HANDLE arg1);
UInt32_BOOL PalSetEvent(HANDLE arg1);
uint32_t PalWaitForSingleObjectEx(HANDLE arg1, uint32_t arg2, UInt32_BOOL arg3);

void PalGetSystemTimeAsFileTime(FILETIME * arg1);

void RuntimeThreadShutdown(void* thread);

typedef void (*ThreadExitCallback)();
Expand Down
5 changes: 1 addition & 4 deletions src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,10 +519,7 @@ int64_t
ep_rt_aot_system_timestamp_get (void)
{
STATIC_CONTRACT_NOTHROW;

FILETIME value;
PalGetSystemTimeAsFileTime (&value);
return static_cast<int64_t>(((static_cast<uint64_t>(value.dwHighDateTime)) << 32) | static_cast<uint64_t>(value.dwLowDateTime));
return minipal_get_system_time();
}

int32_t
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/nativeaot/Runtime/inc/stressLog.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ class StressLog {
CrstStatic *pLock; // lock
uint64_t tickFrequency; // number of ticks per second
uint64_t startTimeStamp; // start time from when tick counter started
FILETIME startTime; // time the application started
uint64_t startTime; // time the application started in Windows FILETIME precision (100ns since 01 Jan 1601)
size_t moduleOffset; // Used to compute format strings.

#ifndef DACCESS_COMPILE
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/nativeaot/Runtime/stressLog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void StressLog::Initialize(unsigned facilities, unsigned level, unsigned maxByt

theLog.tickFrequency = getTickFrequency();

PalGetSystemTimeAsFileTime (&theLog.startTime);
theLog.startTime = minipal_get_system_time();
theLog.startTimeStamp = getTimeStamp();

theLog.moduleOffset = (size_t)hMod; // HMODULES are base addresses.
Expand Down
15 changes: 0 additions & 15 deletions src/coreclr/nativeaot/Runtime/unix/PalUnix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1234,21 +1234,6 @@ int32_t PalGetModuleFileName(_Out_ const TCHAR** pModuleNameOut, HANDLE moduleBa
#endif // defined(HOST_WASM)
}

static const int64_t SECS_BETWEEN_1601_AND_1970_EPOCHS = 11644473600LL;
static const int64_t SECS_TO_100NS = 10000000; /* 10^7 */

void PalGetSystemTimeAsFileTime(FILETIME *lpSystemTimeAsFileTime)
{
struct timeval time = { 0 };
gettimeofday(&time, NULL);

int64_t result = ((int64_t)time.tv_sec + SECS_BETWEEN_1601_AND_1970_EPOCHS) * SECS_TO_100NS +
(time.tv_usec * 10);

lpSystemTimeAsFileTime->dwLowDateTime = (uint32_t)result;
lpSystemTimeAsFileTime->dwHighDateTime = (uint32_t)(result >> 32);
}

uint64_t PalGetCurrentOSThreadId()
{
return (uint64_t)minipal_get_current_thread_id();
Expand Down
5 changes: 0 additions & 5 deletions src/coreclr/nativeaot/Runtime/windows/PalMinWin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1063,8 +1063,3 @@ uint32_t PalWaitForSingleObjectEx(HANDLE arg1, uint32_t arg2, UInt32_BOOL arg3)
{
return ::WaitForSingleObjectEx(arg1, arg2, arg3);
}

void PalGetSystemTimeAsFileTime(FILETIME * arg1)
{
::GetSystemTimeAsFileTime(arg1);
}
32 changes: 0 additions & 32 deletions src/coreclr/pal/inc/pal.h
Original file line number Diff line number Diff line change
Expand Up @@ -548,38 +548,6 @@ PALAPI GetFileSizeEx(
IN HANDLE hFile,
OUT PLARGE_INTEGER lpFileSize);

PALIMPORT
VOID
PALAPI
GetSystemTimeAsFileTime(
OUT LPFILETIME lpSystemTimeAsFileTime);

typedef struct _SYSTEMTIME {
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;

PALIMPORT
VOID
PALAPI
GetSystemTime(
OUT LPSYSTEMTIME lpSystemTime);

PALIMPORT
BOOL
PALAPI
FileTimeToSystemTime(
IN CONST FILETIME *lpFileTime,
OUT LPSYSTEMTIME lpSystemTime);



PALIMPORT
BOOL
PALAPI
Expand Down
7 changes: 0 additions & 7 deletions src/coreclr/pal/inc/palprivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,6 @@ PALAPI
RemoveDirectoryW(
IN LPCWSTR lpPathName);

PALIMPORT
LONG
PALAPI
CompareFileTime(
IN CONST FILETIME *lpFileTime1,
IN CONST FILETIME *lpFileTime2);

#ifdef __cplusplus
}
#endif
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/pal/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ set(SOURCES
exception/signal.cpp
file/directory.cpp
file/file.cpp
file/filetime.cpp
file/path.cpp
handlemgr/handleapi.cpp
handlemgr/handlemgr.cpp
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/pal/src/file/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ SET_DEFAULT_DEBUG_CHANNEL(FILE); // some headers have code with asserts, so do t

#include "pal/palinternal.h"
#include "pal/file.h"
#include "pal/filetime.h"
#include "pal/utils.h"

#include <time.h>
Expand Down
Loading
Loading