ReactOS  0.4.13-dev-464-g6b95727
stopwatch.c File Reference
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "winternl.h"
#include "wine/debug.h"
Include dependency graph for stopwatch.c:

Go to the source code of this file.

Macros

#define NONAMELESSUNION
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (shell)
 
DWORD WINAPI StopWatchMode (void)
 
void WINAPI StopWatchFlush (void)
 
DWORD WINAPI StopWatchW (DWORD dwClass, LPCWSTR lpszStr, DWORD dwUnknown, DWORD dwMode, DWORD dwTimeStamp)
 
DWORD WINAPI StopWatchA (DWORD dwClass, LPCSTR lpszStr, DWORD dwUnknown, DWORD dwMode, DWORD dwTimeStamp)
 
void WINAPI StopWatch_TimerHandler (HWND hWnd, PVOID pvUnknown1, BOOL bUnknown2, HWND *pClassWnd)
 
void WINAPI StopWatch_MarkFrameStart (LPCSTR lpszName)
 
void WINAPI StopWatch_MarkJavaStop (LPCWSTR lpszEvent, HWND hWnd, DWORD dwReserved)
 
DWORD WINAPI GetPerfTime (void)
 
DWORD WINAPI StopWatch_SetMsgLastLocation (DWORD dwUnknown)
 

Macro Definition Documentation

◆ NONAMELESSUNION

#define NONAMELESSUNION

Definition at line 33 of file stopwatch.c.

Function Documentation

◆ GetPerfTime()

DWORD WINAPI GetPerfTime ( void  )

Definition at line 191 of file stopwatch.c.

192 {
193  static LARGE_INTEGER iCounterFreq = { {0} };
194  LARGE_INTEGER iCounter;
195 
196  TRACE("()\n");
197 
198  if (!iCounterFreq.QuadPart)
199  QueryPerformanceFrequency(&iCounterFreq);
200 
201  QueryPerformanceCounter(&iCounter);
202  iCounter.QuadPart = iCounter.QuadPart * 1000 / iCounterFreq.QuadPart;
203  return iCounter.u.LowPart;
204 }
BOOL WINAPI QueryPerformanceFrequency(OUT PLARGE_INTEGER lpFrequency)
Definition: perfcnt.c:45
#define TRACE(s)
Definition: solgame.cpp:4
BOOL WINAPI QueryPerformanceCounter(OUT PLARGE_INTEGER lpPerformanceCount)
Definition: perfcnt.c:23
struct _LARGE_INTEGER::@2196 u
LONGLONG QuadPart
Definition: typedefs.h:112

◆ StopWatch_MarkFrameStart()

void WINAPI StopWatch_MarkFrameStart ( LPCSTR  lpszName)

Definition at line 155 of file stopwatch.c.

156 {
157  FIXME("(%s) stub!\n", debugstr_a(lpszName));
158 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define debugstr_a
Definition: kernel32.h:31

◆ StopWatch_MarkJavaStop()

void WINAPI StopWatch_MarkJavaStop ( LPCWSTR  lpszEvent,
HWND  hWnd,
DWORD  dwReserved 
)

Definition at line 175 of file stopwatch.c.

176 {
177  FIXME("(%s,%p,0x%08x) stub!\n", debugstr_w(lpszEvent), hWnd, dwReserved);
178 }
HWND hWnd
Definition: settings.c:17
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:90
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110

◆ StopWatch_SetMsgLastLocation()

DWORD WINAPI StopWatch_SetMsgLastLocation ( DWORD  dwUnknown)

Definition at line 219 of file stopwatch.c.

220 {
221  FIXME("(%d) stub!\n", dwUnknown);
222 
223  return dwUnknown;
224 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ StopWatch_TimerHandler()

void WINAPI StopWatch_TimerHandler ( HWND  hWnd,
PVOID  pvUnknown1,
BOOL  bUnknown2,
HWND pClassWnd 
)

Definition at line 137 of file stopwatch.c.

138 {
139  FIXME("(%p,%p,%d,%p) stub!\n", hWnd, pvUnknown1, bUnknown2 ,pClassWnd);
140 }
HWND hWnd
Definition: settings.c:17
#define FIXME(fmt,...)
Definition: debug.h:110

◆ StopWatchA()

DWORD WINAPI StopWatchA ( DWORD  dwClass,
LPCSTR  lpszStr,
DWORD  dwUnknown,
DWORD  dwMode,
DWORD  dwTimeStamp 
)

Definition at line 109 of file stopwatch.c.

111 { DWORD retval;
112  UNICODE_STRING szStrW;
113 
114  if(lpszStr) RtlCreateUnicodeStringFromAsciiz(&szStrW, lpszStr);
115  else szStrW.Buffer = NULL;
116 
117  retval = StopWatchW(dwClass, szStrW.Buffer, dwUnknown, dwMode, dwTimeStamp);
118 
119  RtlFreeUnicodeString(&szStrW);
120  return retval;
121 }
smooth NULL
Definition: ftsmooth.c:416
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
unsigned long DWORD
Definition: ntddk_ex.h:95
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
DWORD WINAPI StopWatchW(DWORD dwClass, LPCWSTR lpszStr, DWORD dwUnknown, DWORD dwMode, DWORD dwTimeStamp)
Definition: stopwatch.c:96

◆ StopWatchFlush()

void WINAPI StopWatchFlush ( void  )

Definition at line 75 of file stopwatch.c.

76 {
77  FIXME("() stub!\n");
78 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ StopWatchMode()

DWORD WINAPI StopWatchMode ( void  )

Definition at line 58 of file stopwatch.c.

59 {
60  FIXME("() stub!\n");
61  return 0;
62 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ StopWatchW()

DWORD WINAPI StopWatchW ( DWORD  dwClass,
LPCWSTR  lpszStr,
DWORD  dwUnknown,
DWORD  dwMode,
DWORD  dwTimeStamp 
)

Definition at line 96 of file stopwatch.c.

98 {
99  FIXME("(%d,%s,%d,%d,%d) stub!\n", dwClass, debugstr_w(lpszStr),
100  dwUnknown, dwMode, dwTimeStamp);
101  return ERROR_SUCCESS;
102 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110

Referenced by StopWatchA().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( shell  )