time.h
Go to the documentation of this file.
1 
9 #pragma once
10 #include <iosfwd>
11 #include "interop/util/cstdint.h"
12 
13 namespace illumina { namespace interop { namespace util
14 {
15 #pragma pack(1)
16 
20  {
22  csharp_date_time(const ::uint64_t v = 0);
27  ::uint64_t to_unix()const;
32  double to_seconds()const;
33 
41  static ::uint64_t to_unix(const ::uint64_t val);
49  static double to_seconds(const ::uint64_t val);
55  static csharp_date_time to_csharp(const ::uint64_t uval);
56 
58  ::uint64_t value;
59 
64  operator uint64_t()const
65  {
66  return value;
67  }
74  ::uint64_t to_binary()const;
80  bool operator==(const csharp_date_time& other)const;
87  friend std::ostream& operator<<(std::ostream& out, const csharp_date_time& date_time );
94  friend std::istream& operator>>(std::istream& in, csharp_date_time& date_time);
95 
96  private:
97  static ::uint64_t ticks_per_second();
98  static ::uint64_t ticks_to_1970();
99  };
100 #pragma pack()
101 }}}
102 
Definition: enum_description.h:15
::uint64_t to_unix() const
Definition: time.cpp:41
::uint64_t value
Definition: time.h:58
friend std::ostream & operator<<(std::ostream &out, const csharp_date_time &date_time)
Definition: time.cpp:133
double to_seconds() const
Definition: time.cpp:49
csharp_date_time(const ::uint64_t v=0)
Definition: time.cpp:36
static csharp_date_time to_csharp(const ::uint64_t uval)
Definition: time.cpp:98
bool operator==(const csharp_date_time &other) const
Definition: time.cpp:122
::uint64_t to_binary() const
Definition: time.cpp:113
friend std::istream & operator>>(std::istream &in, csharp_date_time &date_time)
Definition: time.cpp:146