Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
ec21a925
Commit
ec21a925
authored
Nov 08, 2007
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed problem in my_micro_time_and_time().
parent
8160075c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
mysys/my_getsystime.c
mysys/my_getsystime.c
+9
-2
No files found.
mysys/my_getsystime.c
View file @
ec21a925
...
...
@@ -17,6 +17,11 @@
/* thus to get the current time we should use the system function
with the highest possible resolution */
/*
TODO: in functions my_micro_time() and my_micro_time_and_time() there
exists some common code that should be merged into a function.
*/
#include "mysys_priv.h"
#include "my_static.h"
...
...
@@ -113,7 +118,7 @@ ulonglong my_micro_time()
query_performance_frequency
));
}
else
newtime
=
(
GetTickCount
()
*
1000
);
/* GetTickCount only returns millisec
onds
*/
newtime
=
(
GetTickCount
()
*
1000
);
/* GetTickCount only returns millisec */
return
newtime
;
#elif defined(HAVE_GETHRTIME)
return
gethrtime
()
/
1000
;
...
...
@@ -161,7 +166,9 @@ ulonglong my_micro_time_and_time(time_t *time_arg)
if
(
query_performance_frequency
)
{
QueryPerformanceCounter
((
LARGE_INTEGER
*
)
&
newtime
);
newtime
/=
(
query_performance_frequency
*
1000000
);
return
((
newtime
/
query_performance_frequency
*
10000000
)
+
(
newtime
%
query_performance_frequency
*
10000000
/
query_performance_frequency
));
}
else
newtime
=
(
GetTickCount
()
*
1000
);
/* GetTickCount only returns millisec. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment