<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://snipersim.org//w/index.php?action=history&amp;feed=atom&amp;title=Simulator_hooks</id>
	<title>Simulator hooks - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://snipersim.org//w/index.php?action=history&amp;feed=atom&amp;title=Simulator_hooks"/>
	<link rel="alternate" type="text/html" href="https://snipersim.org//w/index.php?title=Simulator_hooks&amp;action=history"/>
	<updated>2026-06-01T02:17:39Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://snipersim.org//w/index.php?title=Simulator_hooks&amp;diff=228&amp;oldid=prev</id>
		<title>Wheirman: Created page with &quot;Applications can interface with the simulation using a number of hooks defined in &lt;code&gt;sniper/include/sim_api.h&lt;/code&gt;. To use these, include &lt;code&gt;#include &amp;lt;sim_api.h&amp;gt;&lt;/c...&quot;</title>
		<link rel="alternate" type="text/html" href="https://snipersim.org//w/index.php?title=Simulator_hooks&amp;diff=228&amp;oldid=prev"/>
		<updated>2012-01-16T14:27:14Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Applications can interface with the simulation using a number of hooks defined in &amp;lt;code&amp;gt;sniper/include/sim_api.h&amp;lt;/code&amp;gt;. To use these, include &amp;lt;code&amp;gt;#include &amp;lt;sim_api.h&amp;gt;&amp;lt;/c...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Applications can interface with the simulation using a number of hooks defined in &amp;lt;code&amp;gt;sniper/include/sim_api.h&amp;lt;/code&amp;gt;. To use these, include &amp;lt;code&amp;gt;#include &amp;amp;lt;sim_api.h&amp;amp;gt;&amp;lt;/code&amp;gt; in your application and compile it with the &amp;lt;code&amp;gt;-I${GRAPHITE_ROOT}/include&amp;lt;/code&amp;gt; flag.&lt;br /&gt;
&lt;br /&gt;
* SimRoiStart() and SimRoiEnd(): start or end the region of interest (ROI), this will start or end detailed performance simulation&lt;br /&gt;
* SimSetFreqMHz(proc, mhz): set the clock frequency of core &amp;lt;code&amp;gt;proc&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;mhz&amp;lt;/code&amp;gt; MHz&lt;br /&gt;
* SimSetOwnFreqMHz(mhz): set the clock frequency of the core executing this function to &amp;lt;code&amp;gt;mhz&amp;lt;/code&amp;gt; MHz&lt;br /&gt;
* SimGetFreqMHz(proc), SimGetOwnFreqMHz(): retrieve the clock frequency of a specific or the current core, in MHz&lt;br /&gt;
* SimMarker(arg0, arg1): define a marker. Scripts register to receive a callback when these markers are executed, see [[Scripting]]&lt;br /&gt;
* SimUser(cmd, arg): user-defined function returning a value, see [[Scripting]]&lt;br /&gt;
* SimInSimulator(): return 1 when the application is being run inside Sniper, and 0 otherwise&lt;/div&gt;</summary>
		<author><name>Wheirman</name></author>
		
	</entry>
</feed>