.NET/Windows API for .NET
GetTickCount - Windows가동 시간알아내기
클리엘
2019. 8. 5. 17:27
728x90
GetTickCount함수는 Windows OS가 처음 Booting된 이후 현재까지 작동된 시간을 1/00초단위로 반환합니다.
Declare Function GetTickCount Lib "kernel32" Alias "GetTickCount" () As Integer
- VB.NET 선언
[DllImport("kernel32")]
public static extern int GetTickCount();
- C# 선언
다음은 MessageBox를 통해 GetTickCount함수의 반환값을 확인하는 예제입니다.
MessageBox.Show(GetTickCount())
- VB.NET 호출
MessageBox.Show(GetTickCount().ToString());
- C# 호출
728x90