cpp-common/bt2c/fmt.hpp: use `wise_enum::string_type` in `EnableIfIsWiseEnum` definition
[babeltrace.git] / include / babeltrace2 / util.h
index 6a76372dafdaa1d2fed3e9598d1f45951e7eb572..80c0e66bde5e4bf5820310c072dff3a8485b79c9 100644 (file)
@@ -1,28 +1,14 @@
-#ifndef BABELTRACE2_UTIL_H
-#define BABELTRACE2_UTIL_H
-
 /*
- * 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
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
+ * SPDX-License-Identifier: MIT
  *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation
  */
 
+#ifndef BABELTRACE2_UTIL_H
+#define BABELTRACE2_UTIL_H
+
+/* IWYU pragma: private, include <babeltrace2/babeltrace.h> */
+
 #ifndef __BT_IN_BABELTRACE_H
 # error "Please include <babeltrace2/babeltrace.h> instead."
 #endif
@@ -89,13 +75,13 @@ The following illustration shows the possible scenarios:
 \bt_p{offset_seconds} can be negative. For example, considering:
 
 - A 1000&nbsp;Hz clock.
-- \bt_p{offset_seconds} set to -10&nbsp;seconds.
+- \bt_p{offset_seconds} set to 10&nbsp;seconds.
 - \bt_p{offset_cycles} set to 500&nbsp;cycles
   (that is, 0.5&nbsp;seconds).
 - \bt_p{cycles} set to 2000&nbsp;cycles (that is, 2&nbsp;seconds).
 
-The computed value is -7.5&nbsp;seconds, so this function sets
-\bt_p{*ns_from_origin} to -7,500,000,000.
+The computed value is 7.5&nbsp;seconds, so this function sets
+\bt_p{*ns_from_origin} to 7,500,000,000.
 
 This function can fail and return the
 #BT_UTIL_CLOCK_CYCLES_TO_NS_FROM_ORIGIN_STATUS_OVERFLOW_ERROR status
@@ -137,7 +123,7 @@ code if any step of the computation process causes an integer overflow.
 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_from_origin);
+               uint64_t offset_cycles, int64_t *ns_from_origin) __BT_NOEXCEPT;
 
 /*! @} */
 
This page took 0.024056 seconds and 4 git commands to generate.