}\r
}\r
\r
+ /**\r
+ * Sets the Timer implementation that will be used for calculating\r
+ * frame times. By default, Application will use the Timer as returned\r
+ * by the current JmeContext implementation.\r
+ */\r
+ public void setTimer(Timer timer){\r
+ this.timer = timer;\r
+ \r
+ if (timer != null) {\r
+ timer.reset();\r
+ }\r
+ \r
+ if (renderManager != null) {\r
+ renderManager.setTimer(timer);\r
+ }\r
+ } \r
+\r
private void initDisplay(){\r
// aquire important objects\r
// from the context\r
settings = context.getSettings();\r
- timer = context.getTimer();\r
+ \r
+ // Only reset the timer if a user has not already provided one \r
+ if (timer == null) {\r
+ timer = context.getTimer();\r
+ }\r
\r
renderer = context.getRenderer();\r
}\r