Files
allwpilib/hal/src/main/native/include/HAL/cpp/fpga_clock.h
Tyler Veness 0ef9803363 Update copyright year to 2018 (#864)
Also fix a few files with incorrect line endings.
2018-01-02 11:20:21 -06:00

32 lines
1.1 KiB
C++

/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
#pragma once
#include <chrono>
#include <limits>
namespace hal {
class fpga_clock {
public:
typedef std::chrono::microseconds::rep rep;
typedef std::chrono::microseconds::period period;
typedef std::chrono::microseconds duration;
typedef std::chrono::time_point<fpga_clock> time_point;
static fpga_clock::time_point now() noexcept;
static constexpr bool is_steady = true;
static fpga_clock::time_point epoch() noexcept { return time_point(zero()); }
static fpga_clock::duration zero() noexcept { return duration(0); }
static const time_point min_time;
};
} // namespace hal