OLD | NEW |
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 /* This Source Code Form is subject to the terms of the Mozilla Public | 2 /* This Source Code Form is subject to the terms of the Mozilla Public |
3 * License, v. 2.0. If a copy of the MPL was not distributed with this | 3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
5 | 5 |
6 | 6 |
7 #include "primpl.h" | 7 #include "primpl.h" |
8 | 8 |
9 #include <string.h> | 9 #include <string.h> |
10 #include <unistd.h> | 10 #include <unistd.h> |
11 #include <errno.h> | 11 #include <errno.h> |
12 #include <sys/time.h> | 12 #include <sys/time.h> |
13 | 13 |
14 | 14 |
15 #if defined(SOLARIS) | 15 #if defined(SOLARIS) |
16 | 16 |
17 static size_t | 17 static size_t |
18 GetHighResClock(void *buf, size_t maxbytes) | 18 GetHighResClock(void *buf, size_t maxbytes) |
19 { | 19 { |
20 hrtime_t t; | 20 hrtime_t t; |
21 t = gethrtime(); | 21 t = gethrtime(); |
22 if (t) { | 22 if (t) { |
23 return _pr_CopyLowBits(buf, maxbytes, &t, sizeof(t)); | 23 return _pr_CopyLowBits(buf, maxbytes, &t, sizeof(t)); |
24 } | 24 } |
error: old chunk mismatch |
None
OLD | NEW |