| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Google Inc. All rights reserved. | 3 * Copyright (C) 2008 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 inline double currentTimeMS() | 45 inline double currentTimeMS() |
| 46 { | 46 { |
| 47 return currentTime() * 1000.0; | 47 return currentTime() * 1000.0; |
| 48 } | 48 } |
| 49 | 49 |
| 50 // Provides a monotonically increasing time in seconds since an arbitrary point
in the past. | 50 // Provides a monotonically increasing time in seconds since an arbitrary point
in the past. |
| 51 // On unsupported platforms, this function only guarantees the result will be no
n-decreasing. | 51 // On unsupported platforms, this function only guarantees the result will be no
n-decreasing. |
| 52 WTF_EXPORT double monotonicallyIncreasingTime(); | 52 WTF_EXPORT double monotonicallyIncreasingTime(); |
| 53 | 53 |
| 54 typedef double(*TimeFunction)(void); | 54 typedef double(*TimeFunction)(void); |
| 55 void setCurrentTimeFunction(TimeFunction); | |
| 56 void setMonotonicallyIncreasingTimeFunction(TimeFunction); | |
| 57 | |
| 58 | 55 |
| 59 } // namespace WTF | 56 } // namespace WTF |
| 60 | 57 |
| 61 using WTF::currentTime; | 58 using WTF::currentTime; |
| 62 using WTF::currentTimeMS; | 59 using WTF::currentTimeMS; |
| 63 using WTF::monotonicallyIncreasingTime; | 60 using WTF::monotonicallyIncreasingTime; |
| 64 | 61 |
| 65 #endif // SKY_ENGINE_WTF_CURRENTTIME_H_ | 62 #endif // SKY_ENGINE_WTF_CURRENTTIME_H_ |
| OLD | NEW |