Mr Flibble
unread,May 2, 2020, 9:35:53 PM5/2/20You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi,
Doing my bit to fight climate change:
#pragma once
#include <neogfx/neogfx.hpp>
#include <chrono>
#include <neogfx/core/i_event.hpp>
namespace neogfx
{
class i_power
{
public:
declare_event(activity_registered)
declare_event(green_mode_enabled)
declare_event(green_mode_disabled)
declare_event(green_mode_entered)
declare_event(green_mode_left)
declare_event(turbo_mode_enabled)
declare_event(turbo_mode_disabled)
declare_event(turbo_mode_entered)
declare_event(turbo_mode_left)
public:
virtual ~i_power() = default;
public:
virtual void register_activity() = 0;
virtual std::chrono::seconds activity_timeout() const = 0;
virtual void set_activity_timeout(std::chrono::seconds aTimeout) = 0;
virtual bool is_green_mode_enabled() const = 0;
virtual void enable_green_mode() = 0;
virtual void disable_green_mode() = 0;
public:
bool is_turbo_mode_enabled() const
{
return !is_green_mode_enabled();
}
void enable_turbo_mode()
{
disable_green_mode();
}
void disable_turbo_mode()
{
enable_green_mode();
}
};
}
/Flibble
--
"Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin
“You won’t burn in hell. But be nice anyway.” – Ricky Gervais
“I see Atheists are fighting and killing each other again, over who doesn’t believe in any God the most. Oh, no..wait.. that never happens.” – Ricky Gervais
"Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?"
"I'd say, bone cancer in children? What's that about?" Fry replied.
"How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil."
"Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say."