Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/ws-manager-mk2/pkg/activity/activity.go
2499 views
1
// Copyright (c) 2023 Gitpod GmbH. All rights reserved.
2
// Licensed under the GNU Affero General Public License (AGPL).
3
// See License-AGPL.txt in the project root for license information.
4
5
package activity
6
7
import (
8
"time"
9
10
workspacev1 "github.com/gitpod-io/gitpod/ws-manager/api/crd/v1"
11
)
12
13
func Last(ws *workspacev1.Workspace) *time.Time {
14
lastActivity := ws.Status.LastActivity
15
if lastActivity != nil {
16
return &lastActivity.Time
17
}
18
19
return nil
20
}
21
22