MCPcopy Create free account
hub / github.com/Kitware/VTK / CreateTimer

Method CreateTimer

Rendering/Core/vtkRenderWindowInteractor.cxx:797–817  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Timer methods. There are two basic groups of methods, those for backward compatibility (group #1) and those that operate on specific timers (i.e., use timer ids). The first group of methods implicitly assume that there is only one timer at a time running. This was okay in the old days of VTK when only the interactors us

Source from the content-addressed store, hash-verified

795//
796// old-style group #1
797int vtkRenderWindowInteractor::CreateTimer(int timerType)
798{
799 int platformTimerId, timerId;
800 if (timerType == VTKI_TIMER_FIRST)
801 {
802 unsigned long duration = this->TimerDuration;
803 timerId = vtkTimerId; // just use current id, assume we don't have multiple timers
804 platformTimerId = this->InternalCreateTimer(timerId, RepeatingTimer, duration);
805 if (0 == platformTimerId)
806 {
807 return 0;
808 }
809 (*this->TimerMap)[timerId] = vtkTimerStruct(platformTimerId, RepeatingTimer, duration);
810 return timerId;
811 }
812
813 else // VTKI_TIMER_UPDATE is just updating last created timer
814 {
815 return 1; // do nothing because repeating timer has been created
816 }
817}
818
819//------------------------------------------------------------------------------
820// old-style group #1

Callers

nothing calls this directly

Calls 2

InternalCreateTimerMethod · 0.95
vtkTimerStructFunction · 0.85

Tested by

no test coverage detected