equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * Copyright 2012, 2014 SAP AG. All rights reserved. |
3 * Copyright 2012, 2014 SAP AG. All rights reserved. |
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 * |
5 * |
6 * This code is free software; you can redistribute it and/or modify it |
6 * This code is free software; you can redistribute it and/or modify it |
7 * under the terms of the GNU General Public License version 2 only, as |
7 * under the terms of the GNU General Public License version 2 only, as |
1112 timeval time; |
1112 timeval time; |
1113 int status = gettimeofday(&time, NULL); |
1113 int status = gettimeofday(&time, NULL); |
1114 assert(status != -1, "aix error at gettimeofday()"); |
1114 assert(status != -1, "aix error at gettimeofday()"); |
1115 return jlong(time.tv_sec) * 1000 + jlong(time.tv_usec / 1000); |
1115 return jlong(time.tv_sec) * 1000 + jlong(time.tv_usec / 1000); |
1116 } |
1116 } |
|
1117 |
|
1118 void os::javaTimeSystemUTC(jlong &seconds, jlong &nanos) { |
|
1119 timeval time; |
|
1120 int status = gettimeofday(&time, NULL); |
|
1121 assert(status != -1, "aix error at gettimeofday()"); |
|
1122 seconds = jlong(time.tv_sec); |
|
1123 nanos = jlong(time.tv_usec) * 1000; |
|
1124 } |
|
1125 |
1117 |
1126 |
1118 // We need to manually declare mread_real_time, |
1127 // We need to manually declare mread_real_time, |
1119 // because IBM didn't provide a prototype in time.h. |
1128 // because IBM didn't provide a prototype in time.h. |
1120 // (they probably only ever tested in C, not C++) |
1129 // (they probably only ever tested in C, not C++) |
1121 extern "C" |
1130 extern "C" |