| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 57 } | 57 } | 
| 58 | 58 | 
| 59 using TimeFunction = double (*)(); | 59 using TimeFunction = double (*)(); | 
| 60 | 60 | 
| 61 // Make all the time functions (currentTime(), monotonicallyIncreasingTime(), | 61 // Make all the time functions (currentTime(), monotonicallyIncreasingTime(), | 
| 62 // systemTraceTime()) return the result of the supplied function. Returns the | 62 // systemTraceTime()) return the result of the supplied function. Returns the | 
| 63 // pointer to the old time function. For both setting and getting, nullptr | 63 // pointer to the old time function. For both setting and getting, nullptr | 
| 64 // means using the default timing function returning the actual time. | 64 // means using the default timing function returning the actual time. | 
| 65 WTF_EXPORT TimeFunction setTimeFunctionsForTesting(TimeFunction); | 65 WTF_EXPORT TimeFunction setTimeFunctionsForTesting(TimeFunction); | 
| 66 | 66 | 
|  | 67 // Allows wtf/Time.h to use the same mock time function | 
|  | 68 WTF_EXPORT TimeFunction getTimeFunctionForTesting(); | 
|  | 69 | 
| 67 }  // namespace WTF | 70 }  // namespace WTF | 
| 68 | 71 | 
| 69 using WTF::currentTime; | 72 using WTF::currentTime; | 
| 70 using WTF::currentTimeMS; | 73 using WTF::currentTimeMS; | 
| 71 using WTF::monotonicallyIncreasingTime; | 74 using WTF::monotonicallyIncreasingTime; | 
| 72 using WTF::monotonicallyIncreasingTimeMS; | 75 using WTF::monotonicallyIncreasingTimeMS; | 
| 73 using WTF::TimeFunction; | 76 using WTF::TimeFunction; | 
| 74 using WTF::setTimeFunctionsForTesting; | 77 using WTF::setTimeFunctionsForTesting; | 
| 75 | 78 | 
| 76 #endif  // CurrentTime_h | 79 #endif  // CurrentTime_h | 
| OLD | NEW | 
|---|