---
title: "update(deltaTime:)"
framework: gameplaykit
role: symbol
role_heading: Instance Method
path: "gameplaykit/gkcomponent/update(deltatime:)"
---

# update(deltaTime:)

Performs any custom periodic actions defined by the component subclass.

## Declaration

```swift
func update(deltaTime seconds: TimeInterval)
```

## Parameters

- `seconds`: The time step to use for any time-dependent actions performed by this method (typically, the elapsed time since the previous call to this method).

## Discussion

Discussion Override this method to implement per-frame logic specific to your component class. GameplayKit calls this method when you call the update(deltaTime:) method of the entity owning a component, or when you call the update(deltaTime:) method of a GKComponentSystem object that manages all components of a specific GKComponent subclass. Typically, you call one of those methods in response to a per-frame game loop method such as update(_:) (SpriteKit) or renderer(_:updateAtTime:) (SceneKit). For more information, see GameplayKit Programming Guide.
