xtd 1.0.0
Loading...
Searching...
No Matches
animation_update_event_args.hpp
Go to the documentation of this file.
1
4#pragma once
5#include <xtd/event_args>
6#include <xtd/time_span>
7
9namespace xtd {
11 namespace forms {
22 class animation_updated_event_args : public xtd::event_args {
23 public:
25
27 animation_updated_event_args(xtd::uint32 frame_counter, xtd::int64 elapsed_nanoseconds) : frame_counter_ {frame_counter}, elapsed_nanoseconds_{elapsed_nanoseconds} {}
29
31
35 [[nodiscard]] auto elapsed() const -> xtd::time_span {return xtd::time_span {std::chrono::duration_cast<xtd::ticks>(std::chrono::nanoseconds {elapsed_nanoseconds_}).count()};}
36
39 [[nodiscard]] auto elapsed_milliseconds() const -> xtd::int64 {return std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::nanoseconds {elapsed_nanoseconds_}).count();}
40
43 [[nodiscard]] auto elapsed_nanoseconds() const -> xtd::int64 {return elapsed_nanoseconds_;}
44
47 [[nodiscard]] auto frame_counter() const -> xtd::uint32 {return frame_counter_;}
49
50 private:
51 xtd::uint32 frame_counter_ = 0;
52 xtd::int64 elapsed_nanoseconds_ {0};
53 };
54 }
55}
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition event_args.hpp:18
auto elapsed_milliseconds() const -> xtd::int64
Gets elepased time in milliseconds.
Definition animation_update_event_args.hpp:39
auto frame_counter() const -> xtd::uint32
Gets frame counter.
Definition animation_update_event_args.hpp:47
auto elapsed_nanoseconds() const -> xtd::int64
Gets elepased time in nanoseconds.
Definition animation_update_event_args.hpp:43
auto elapsed() const -> xtd::time_span
Gets elepased time in nanoseconds.
Definition animation_update_event_args.hpp:35
Represents a time interval.
Definition time_span.hpp:29
std::int64_t int64
Represents a 64-bit signed integer.
Definition int64.hpp:23
std::uint32_t uint32
Represents a 32-bit unsigned integer.
Definition uint32.hpp:23
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition texts.hpp:219
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8