Sygaldry
Loading...
Searching...
No Matches
sygsp-micros: Portable Timestamp API

Copyright 2023 Travis J. West, Input Devices and Music Interaction Laboratory (IDMIL), Centre for Interdisciplinary Research in Music Media and Technology (CIRMMT), McGill University, Montréal, Canada, and Univ. Lille, Inria, CNRS, Centrale Lille, UMR 9189 CRIStAL, F-59000 Lille, France

SPDX-License-Identifier: MIT

Arduino-style micros with more encapsulation and fewer unwanted dependencies.

This component exists so that, rather than rely directly on the Arduino API, a component can access this functionality through an interface that we can directly control. This should make it easier to port such a component to a platform for which Arduino support is not available. Unless a dependency on another API is already required for some reason, this API should be preferred over the equivalent Arduino API or an API provided by a platform-specific library.

// @#'sygsp-micros.hpp'
#pragma once
/*
Copyright 2023 Travis J. West, Input Devices and Music Interaction Laboratory
(IDMIL), Centre for Interdisciplinary Research in Music Media and Technology
(CIRMMT), McGill University, Montréal, Canada, and Univ. Lille, Inria, CNRS,
Centrale Lille, UMR 9189 CRIStAL, F-59000 Lille, France
SPDX-License-Identifier: MIT
*/
namespace sygaldry { namespace sygsp {
unsigned long micros();
} }
// @/
unsigned long micros()
Get the number of microseconds elapsed since boot.
Definition sygsa-micros.cpp:19
# @#'CMakeLists.txt'
set(lib sygsp-micros)
add_library(${lib} INTERFACE)
target_include_directories(${lib} INTERFACE .)
# @/

Copyright 2023 Travis J. West, Input Devices and Music Interaction Laboratory (IDMIL), Centre for Interdisciplinary Research in Music Media and Technology (CIRMMT), McGill University, Montréal, Canada, and Univ. Lille, Inria, CNRS, Centrale Lille, UMR 9189 CRIStAL, F-59000 Lille, France

SPDX-License-Identifier: MIT

Arduino-style micros with more encapsulation and fewer unwanted dependencies.

// @#'sygsp-micros.hpp'
#pragma once
/*
Copyright 2023 Travis J. West, Input Devices and Music Interaction Laboratory
(IDMIL), Centre for Interdisciplinary Research in Music Media and Technology
(CIRMMT), McGill University, Montréal, Canada, and Univ. Lille, Inria, CNRS,
Centrale Lille, UMR 9189 CRIStAL, F-59000 Lille, France
SPDX-License-Identifier: MIT
*/
namespace sygaldry { namespace sygsp {
unsigned long micros();
} }
// @/
# @#'CMakeLists.txt'
set(lib sygsp-micros)
add_library(${lib} INTERFACE)
target_include_directories(${lib} INTERFACE .)
# @/