OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
3 * for details. All rights reserved. Use of this source code is governed by a | 3 * for details. All rights reserved. Use of this source code is governed by a |
4 * BSD-style license that can be found in the LICENSE file. | 4 * BSD-style license that can be found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #ifndef INCLUDE_DART_API_H_ | 7 #ifndef INCLUDE_DART_API_H_ |
8 #define INCLUDE_DART_API_H_ | 8 #define INCLUDE_DART_API_H_ |
9 | 9 |
10 /** \mainpage Dart Embedding API Reference | 10 /** \mainpage Dart Embedding API Reference |
(...skipping 2877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2888 * | 2888 * |
2889 * NOTE: If multiple callbacks with the same name are registered, only | 2889 * NOTE: If multiple callbacks with the same name are registered, only |
2890 * the last callback registered will be remembered. | 2890 * the last callback registered will be remembered. |
2891 */ | 2891 */ |
2892 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( | 2892 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( |
2893 const char* method, | 2893 const char* method, |
2894 Dart_ServiceRequestCallback callback, | 2894 Dart_ServiceRequestCallback callback, |
2895 void* user_data); | 2895 void* user_data); |
2896 | 2896 |
2897 | 2897 |
| 2898 /** |
| 2899 * Add a duration timeline event to the embedder stream for the current isolate. |
| 2900 * |
| 2901 * \param label The name of the event. |
| 2902 * \param start_micros The start of the duration (in microseconds) |
| 2903 * \param end_micros The end of the duration (in microseconds) |
| 2904 * |
| 2905 * NOTE: On Posix platforms you should use gettimeofday and on Windows platforms |
| 2906 * you should use GetSystemTimeAsFileTime to get the time values. |
| 2907 */ |
| 2908 DART_EXPORT Dart_Handle Dart_TimelineDuration(const char* label, |
| 2909 int64_t start_micros, |
| 2910 int64_t end_micros); |
| 2911 |
| 2912 /** |
| 2913 * Add an instant timeline event to the embedder stream for the current isolate. |
| 2914 * |
| 2915 * \param label The name of event. |
| 2916 * |
| 2917 * NOTE: On Posix platforms this call uses gettimeofday and on Windows platforms |
| 2918 * this call uses GetSystemTimeAsFileTime to get the current time. |
| 2919 */ |
| 2920 DART_EXPORT Dart_Handle Dart_TimelineInstant(const char* label); |
| 2921 |
| 2922 /** |
| 2923 * Adds an asynchronous begin timeline event to the embedder stream for the |
| 2924 * current isolate. |
| 2925 * |
| 2926 * \param label The name of event. |
| 2927 * |
| 2928 * \return Returns an asynchronous id that must be passed to |
| 2929 * Dart_TimelineAsyncInstant and Dart_TimelineAsyncEnd. If the asynchronous |
| 2930 * id is less than 0 the event was not added to the timeline and subsequent |
| 2931 * calls to Dart_TimelineAsyncInstant and Dart_TimelineAsyncEnd will become |
| 2932 * no-ops. |
| 2933 * |
| 2934 * NOTE: On Posix platforms this call uses gettimeofday and on Windows platforms |
| 2935 * this call uses GetSystemTimeAsFileTime to get the current time. |
| 2936 */ |
| 2937 DART_EXPORT Dart_Handle Dart_TimelineAsyncBegin(const char* label, |
| 2938 int64_t* async_id); |
| 2939 |
| 2940 |
| 2941 /** |
| 2942 * Adds an asynchronous instant timeline event to the embedder stream for the |
| 2943 * current isolate. |
| 2944 * |
| 2945 * \param label The name of event. |
| 2946 * |
| 2947 * \return Returns an asynchronous id that must be passed to |
| 2948 * Dart_TimelineAsyncInstant and Dart_TimelineAsyncEnd. |
| 2949 * |
| 2950 * NOTE: On Posix platforms this call uses gettimeofday and on Windows platforms |
| 2951 * this call uses GetSystemTimeAsFileTime to get the current time. |
| 2952 */ |
| 2953 DART_EXPORT Dart_Handle Dart_TimelineAsyncInstant(const char* label, |
| 2954 int64_t async_id); |
| 2955 |
| 2956 |
| 2957 /** |
| 2958 * Adds an asynchronous end timeline event to the embedder stream for the |
| 2959 * current isolate. |
| 2960 * |
| 2961 * \param label The name of event. |
| 2962 * |
| 2963 * \return Returns an asynchronous id that must be passed to |
| 2964 * Dart_TimelineAsyncInstant and Dart_TimelineAsyncEnd. |
| 2965 * |
| 2966 * NOTE: On Posix platforms this call uses gettimeofday and on Windows platforms |
| 2967 * this call uses GetSystemTimeAsFileTime to get the current time. |
| 2968 */ |
| 2969 DART_EXPORT Dart_Handle Dart_TimelineAsyncEnd(const char* label, |
| 2970 int64_t async_id); |
| 2971 |
2898 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 2972 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
OLD | NEW |