Skip to content

Commit

Permalink
Add path based API (#111)
Browse files Browse the repository at this point in the history
* Add path based API

* fix build

* fix lint

* fix lint

* cleanup

* fix log format

* fix log format

* fix lint

* cleanup
  • Loading branch information
davies committed Jan 25, 2021
1 parent bf4dea6 commit 103cd4e
Show file tree
Hide file tree
Showing 8 changed files with 978 additions and 40 deletions.
30 changes: 30 additions & 0 deletions pkg/fs/clock_unix.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// +build !windows

/*
* JuiceFS, Copyright (C) 2021 Juicedata, Inc.
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package fs

import "time"

var started = time.Now()

func Now() time.Time {
return time.Now()
}

func Clock() time.Duration {
return time.Since(started)
}

0 comments on commit 103cd4e

Please sign in to comment.