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


\doxysubsection{Detailed Description}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Ecore__Throttle__Group_ga87ef853420b13160e2991c4945d9a962}\label{group__Ecore__Throttle__Group_ga87ef853420b13160e2991c4945d9a962}} 
\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}}
\doxysubsubsection{\texorpdfstring{ecore\_throttle\_adjust()}{ecore\_throttle\_adjust()}}
{\footnotesize\ttfamily void ecore\+\_\+throttle\+\_\+adjust (\begin{DoxyParamCaption}\item[{double}]{amount }\end{DoxyParamCaption})}



Increases 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 \mbox{\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}{0}
\DoxyCodeLine{\textcolor{keywordtype}{void} enter\_powersave(\textcolor{keywordtype}{void}) \{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Throttle__Group_ga87ef853420b13160e2991c4945d9a962}{ecore\_throttle\_adjust}}(0.2);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"Now at throttle level: \%1.3f\(\backslash\)n"}, \mbox{\hyperlink{group__Ecore__Throttle__Group_gaf43852d91c13951e1e8586f4f759738c}{ecore\_throttle\_get}}());}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{void} enter\_deep\_powersave(\textcolor{keywordtype}{void}) \{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Throttle__Group_ga87ef853420b13160e2991c4945d9a962}{ecore\_throttle\_adjust}}(0.5);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"Now at throttle level: \%1.3f\(\backslash\)n"}, \mbox{\hyperlink{group__Ecore__Throttle__Group_gaf43852d91c13951e1e8586f4f759738c}{ecore\_throttle\_get}}());}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{void} exit\_powersave(\textcolor{keywordtype}{void}) \{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Throttle__Group_ga87ef853420b13160e2991c4945d9a962}{ecore\_throttle\_adjust}}(-\/0.2);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"Now at throttle level: \%1.3f\(\backslash\)n"}, \mbox{\hyperlink{group__Ecore__Throttle__Group_gaf43852d91c13951e1e8586f4f759738c}{ecore\_throttle\_get}}());}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{void} exit\_deep\_powersave(\textcolor{keywordtype}{void}) \{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Throttle__Group_ga87ef853420b13160e2991c4945d9a962}{ecore\_throttle\_adjust}}(-\/0.5);}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"Now at throttle level: \%1.3f\(\backslash\)n"}, \mbox{\hyperlink{group__Ecore__Throttle__Group_gaf43852d91c13951e1e8586f4f759738c}{ecore\_throttle\_get}}());}
\DoxyCodeLine{\}}
\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.

\mbox{\Hypertarget{group__Ecore__Throttle__Group_gaf43852d91c13951e1e8586f4f759738c}\label{group__Ecore__Throttle__Group_gaf43852d91c13951e1e8586f4f759738c}} 
\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}}
\doxysubsubsection{\texorpdfstring{ecore\_throttle\_get()}{ecore\_throttle\_get()}}
{\footnotesize\ttfamily double ecore\+\_\+throttle\+\_\+get (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Gets current throttle level. 

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

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


References 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.

