\hypertarget{group__Ecore__Throttle__Group}{}\section{Ecore Throttle functions}
\label{group__Ecore__Throttle__Group}\index{Ecore Throttle functions@{Ecore Throttle functions}}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{group__Ecore__Throttle__Group_ga87ef853420b13160e2991c4945d9a962}{ecore\+\_\+throttle\+\_\+adjust} (double amount)
\begin{DoxyCompactList}\small\item\em Increase throttle amount. \end{DoxyCompactList}\item 
double \hyperlink{group__Ecore__Throttle__Group_gaf43852d91c13951e1e8586f4f759738c}{ecore\+\_\+throttle\+\_\+get} (void)
\begin{DoxyCompactList}\small\item\em Get current throttle level. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}


\subsection{Function Documentation}
\index{Ecore Throttle functions@{Ecore Throttle functions}!ecore\+\_\+throttle\+\_\+adjust@{ecore\+\_\+throttle\+\_\+adjust}}
\index{ecore\+\_\+throttle\+\_\+adjust@{ecore\+\_\+throttle\+\_\+adjust}!Ecore Throttle functions@{Ecore Throttle functions}}
\subsubsection[{\texorpdfstring{ecore\+\_\+throttle\+\_\+adjust(double amount)}{ecore_throttle_adjust(double amount)}}]{\setlength{\rightskip}{0pt plus 5cm}void ecore\+\_\+throttle\+\_\+adjust (
\begin{DoxyParamCaption}
\item[{double}]{amount}
\end{DoxyParamCaption}
)}\hypertarget{group__Ecore__Throttle__Group_ga87ef853420b13160e2991c4945d9a962}{}\label{group__Ecore__Throttle__Group_ga87ef853420b13160e2991c4945d9a962}


Increase throttle amount. 

This will increase or decrease (if {\ttfamily amount} is positive or negative) the amount of \char`\"{}voluntary throttling\char`\"{} ecore will do to its main loop while running. This is intended to be used to limit animations and wakeups when in a strict power management state. The higher the current throttle value (which can be retrieved by \hyperlink{group__Ecore__Throttle__Group_gaf43852d91c13951e1e8586f4f759738c}{ecore\+\_\+throttle\+\_\+get()} ), the more throttling takes place. If the current throttle value is 0, then no throttling takes place at all.

The value represents how long the ecore main loop will sleep (in seconds) before it goes into a fully idle state waiting for events, input or timing events to wake it up. For example, if the current throttle level is 0.\+5, then after every time the main loop cycles and goes into idle after processing all events, the main loop will explicitly sleep for 0.\+5 seconds before sitting and waiting for incoming events or timeouts, thus preventing animation, async IO and network handling etc. for that period of time. Of course these events, data and timeouts will be buffered, thus not losing anything, simply delaying when they get handled by the throttle value.

Example\+: 
\begin{DoxyCode}
1 void enter\_powersave(void) \{
2    ecore\_throttle\_adjust(0.2);
3    printf("Now at throttle level: %1.3f\(\backslash\)n", ecore\_throttle\_get());
4 \}
5 
6 void enter\_deep\_powersave(void) \{
7    ecore\_throttle\_adjust(0.5);
8    printf("Now at throttle level: %1.3f\(\backslash\)n", ecore\_throttle\_get());
9 \}
10 
11 void exit\_powersave(void) \{
12    ecore\_throttle\_adjust(-0.2);
13    printf("Now at throttle level: %1.3f\(\backslash\)n", ecore\_throttle\_get());
14 \}
15 
16 void exit\_deep\_powersave(void) \{
17    ecore\_throttle\_adjust(-0.5);
18    printf("Now at throttle level: %1.3f\(\backslash\)n", ecore\_throttle\_get());
19 \}
\end{DoxyCode}



\begin{DoxyParams}{Parameters}
{\em amount} & Amount (in seconds) to adjust by \\
\hline
\end{DoxyParams}


References E\+I\+N\+A\+\_\+\+M\+A\+I\+N\+\_\+\+L\+O\+O\+P\+\_\+\+C\+H\+E\+C\+K\+\_\+\+R\+E\+T\+U\+RN.

\index{Ecore Throttle functions@{Ecore Throttle functions}!ecore\+\_\+throttle\+\_\+get@{ecore\+\_\+throttle\+\_\+get}}
\index{ecore\+\_\+throttle\+\_\+get@{ecore\+\_\+throttle\+\_\+get}!Ecore Throttle functions@{Ecore Throttle functions}}
\subsubsection[{\texorpdfstring{ecore\+\_\+throttle\+\_\+get(void)}{ecore_throttle_get(void)}}]{\setlength{\rightskip}{0pt plus 5cm}double ecore\+\_\+throttle\+\_\+get (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\hypertarget{group__Ecore__Throttle__Group_gaf43852d91c13951e1e8586f4f759738c}{}\label{group__Ecore__Throttle__Group_gaf43852d91c13951e1e8586f4f759738c}


Get current throttle level. 

This gets the current throttling level, which can be adjusted by \hyperlink{group__Ecore__Throttle__Group_ga87ef853420b13160e2991c4945d9a962}{ecore\+\_\+throttle\+\_\+adjust()}. The value is in seconds. Please see \hyperlink{group__Ecore__Throttle__Group_ga87ef853420b13160e2991c4945d9a962}{ecore\+\_\+throttle\+\_\+adjust()} for more information.

\begin{DoxyReturn}{Returns}
The current throttle level 
\end{DoxyReturn}


References eina\+\_\+evlog(), and E\+I\+N\+A\+\_\+\+M\+A\+I\+N\+\_\+\+L\+O\+O\+P\+\_\+\+C\+H\+E\+C\+K\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+V\+AL.

