Skip to content

Commit 15d68e3

Browse files
committed
revert removed function to avoid regression
1 parent 09f6c74 commit 15d68e3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

models/issues/stopwatch.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ func (s Stopwatch) Seconds() int64 {
4646
return int64(timeutil.TimeStampNow() - s.CreatedUnix)
4747
}
4848

49+
// Duration returns a human-readable duration string based on local server time
50+
func (s Stopwatch) Duration() string {
51+
return util.SecToHours(s.Seconds())
52+
}
53+
4954
func getStopwatch(ctx context.Context, userID, issueID int64) (sw *Stopwatch, exists bool, err error) {
5055
sw = new(Stopwatch)
5156
exists, err = db.GetEngine(ctx).

0 commit comments

Comments
 (0)