# Total time of batch render

**URL:** https://forum.highend3d.com/t/total-time-of-batch-render/49256
**Category:** Maya
**Tags:** rendering-lighting
**Created:** [May 5, 2010, 1:03pm UTC](https://forum.highend3d.com/t/total-time-of-batch-render/49256 "2010-05-05T13:03:29Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![highend3djojan-](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/h/c68b51/32.png) [@highend3djojan-](https://forum.highend3d.com/u/highend3djojan-)
#### Post date: [May 5, 2010, 1:03pm UTC](https://forum.highend3d.com/t/total-time-of-batch-render/49256/1 "2010-05-05T13:03:29Z")

</div>

How can v print the start time and end time (or the total render time) of a bath render?

And

Where is the code which prints:  
"// Result: Rendering with Maya Software... // " and "// Result: Rendering Completed. See mayaRenderLog.txt for information. // "  
in Maya?

What i need is to get info on the total render time.

---

<div class="post-metadata">

### Author: ![thnkr](https://forum.highend3d.com/user_avatar/forum.highend3d.com/thnkr/32/115_2.png) [@thnkr](https://forum.highend3d.com/u/thnkr)
#### Post date: [May 5, 2010, 1:10pm UTC](https://forum.highend3d.com/t/total-time-of-batch-render/49256/2 "2010-05-05T13:10:13Z")

</div>

Look up the docs for timerX

---

<div class="post-metadata">

### Author: ![highend3djojan-](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/h/c68b51/32.png) [@highend3djojan-](https://forum.highend3d.com/u/highend3djojan-)
#### Post date: [May 5, 2010, 1:16pm UTC](https://forum.highend3d.com/t/total-time-of-batch-render/49256/3 "2010-05-05T13:16:52Z")

</div>

that i knw.. but WHERE can i put that command? ofcourse not in mayaBatchRender.mel - i tried tht.

---

<div class="post-metadata">

### Author: ![nowayfra](https://forum.highend3d.com/user_avatar/forum.highend3d.com/nowayfra/32/76_2.png) [@nowayfra](https://forum.highend3d.com/u/nowayfra)
#### Post date: [May 5, 2010, 3:06pm UTC](https://forum.highend3d.com/t/total-time-of-batch-render/49256/4 "2010-05-05T15:06:03Z")

</div>

You could use the Pre and Post render MEL options in the Render Settings -\> Render Options to get the precise render time but i think thats nothing for batches because the command line renderer doesnt spit out print code for each frame startet from there. Instead, print the render times to a file. Therefore type   
into Pre render MEL: global int $renderTime = 0; $renderTime = `timerX`;  
into Post render Mel: getRenderTime();  
Into your Expression Editor start a new Expression and copy into it:

global proc getRenderTime()  
{  
&nbsp;&nbsp; &nbsp;global int $renderTime;  
&nbsp;&nbsp; &nbsp;string $mode = `filetest -f "c:/renderTimes.txt"` ? "a" : "w";&nbsp;&nbsp; &nbsp;  
&nbsp;&nbsp; &nbsp;$fileId = `fopen "c:/renderTimes.txt" $mode`;  
&nbsp;&nbsp; &nbsp;fprint $fileId("render time: " + `timerX -st $renderTime` + "\n");  
&nbsp;&nbsp; &nbsp;fclose $fileId;  
};

---

<div class="post-metadata">

### Author: ![highend3djojan-](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/h/c68b51/32.png) [@highend3djojan-](https://forum.highend3d.com/u/highend3djojan-)
#### Post date: [May 6, 2010, 3:19am UTC](https://forum.highend3d.com/t/total-time-of-batch-render/49256/5 "2010-05-06T03:19:31Z")

</div>

Thnx man.
