X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace2%2Futil.h;h=d4826541f4f7734d05f2921764745b74a9190d8b;hb=7b6afccb24b31e2feed787c2ed97809e797c3070;hp=515047c1bb2deb342243f064f799b7c5020fce56;hpb=924dc299c8a893e92fcd985fa05c245b591ef314;p=babeltrace.git diff --git a/include/babeltrace2/util.h b/include/babeltrace2/util.h index 515047c1..d4826541 100644 --- a/include/babeltrace2/util.h +++ b/include/babeltrace2/util.h @@ -2,7 +2,7 @@ #define BABELTRACE2_UTIL_H /* - * Copyright (c) 2015-2018 Philippe Proulx + * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -23,18 +23,23 @@ * SOFTWARE. */ +#ifndef __BT_IN_BABELTRACE_H +# error "Please include instead." +#endif + #include #ifdef __cplusplus extern "C" { #endif -typedef enum bt_util_status { - BT_UTIL_STATUS_OK = 0, - BT_UTIL_STATUS_OVERFLOW = -75, -} bt_util_status; +typedef enum bt_util_clock_cycles_to_ns_from_origin_status { + BT_UTIL_CLOCK_CYCLES_TO_NS_FROM_ORIGIN_STATUS_OK = __BT_FUNC_STATUS_OK, + BT_UTIL_CLOCK_CYCLES_TO_NS_FROM_ORIGIN_STATUS_OVERFLOW_ERROR = __BT_FUNC_STATUS_OVERFLOW_ERROR, +} bt_util_clock_cycles_to_ns_from_origin_status; -bt_util_status bt_util_clock_cycles_to_ns_from_origin(uint64_t cycles, +bt_util_clock_cycles_to_ns_from_origin_status +bt_util_clock_cycles_to_ns_from_origin(uint64_t cycles, uint64_t frequency, int64_t offset_seconds, uint64_t offset_cycles, int64_t *ns);