# measure the rendering time in vtk.js using "GetLastRenderTimeInSeconds()"

**URL:** https://discourse.vtk.org/t/measure-the-rendering-time-in-vtk-js-using-getlastrendertimeinseconds/13771
**Category:** Web
**Created:** [April 22, 2024, 12:09pm UTC](https://discourse.vtk.org/t/measure-the-rendering-time-in-vtk-js-using-getlastrendertimeinseconds/13771 "2024-04-22T12:09:01Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Mohammed\_AboArab](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mohammed_aboarab/32/8778_2.png) [@Mohammed\_AboArab](https://discourse.vtk.org/u/Mohammed_AboArab)
#### Post date: [April 22, 2024, 12:09pm UTC](https://discourse.vtk.org/t/measure-the-rendering-time-in-vtk-js-using-getlastrendertimeinseconds/13771/1 "2024-04-22T12:09:01Z")

</div>

I get an error when I used the following:

```auto
const lastRenderTime = renderWindow.GetLastRenderTimeInSeconds();
console.log(`Last Render Time: ${lastRenderTime} seconds`);

```

---

<div class="post-metadata">

### Author: ![Forrest](https://discourse.vtk.org/user_avatar/discourse.vtk.org/forrest/32/300_2.png) [@Forrest](https://discourse.vtk.org/u/Forrest)
#### Post date: [April 22, 2024, 2:19pm UTC](https://discourse.vtk.org/t/measure-the-rendering-time-in-vtk-js-using-getlastrendertimeinseconds/13771/2 "2024-04-22T14:19:46Z")

</div>

The property is on `vtkRenderer`, not `vtkRenderWindow`: `renderer.getLastRenderTimeInSeconds()`.

---

<div class="post-metadata">

### Author: ![Mohammed\_AboArab](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mohammed_aboarab/32/8778_2.png) [@Mohammed\_AboArab](https://discourse.vtk.org/u/Mohammed_AboArab)
#### Post date: [April 22, 2024, 2:58pm UTC](https://discourse.vtk.org/t/measure-the-rendering-time-in-vtk-js-using-getlastrendertimeinseconds/13771/3 "2024-04-22T14:58:47Z")

</div>

Thank you for answering, but I get the following error:  
TypeError: vtkRenderer.GetLastRenderTimeInSeconds is not a function

---

<div class="post-metadata">

### Author: ![Mohammed\_AboArab](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mohammed_aboarab/32/8778_2.png) [@Mohammed\_AboArab](https://discourse.vtk.org/u/Mohammed_AboArab)
#### Post date: [April 22, 2024, 2:59pm UTC](https://discourse.vtk.org/t/measure-the-rendering-time-in-vtk-js-using-getlastrendertimeinseconds/13771/4 "2024-04-22T14:59:50Z")

</div>

> [@Forrest](#):
>
> renderer.getLastRenderTimeInSeconds()

It gives me the same error
