-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* GPL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
/*
#ifndef __LIBCFS_TIME_H__
#define __LIBCFS_TIME_H__
+
/*
* generic time manipulation functions.
*/
return (cfs_time_t)(t1 - t2);
}
-static inline int cfs_time_before(cfs_time_t t1, cfs_time_t t2)
-{
- return time_before(t1, t2);
-}
-
-static inline int cfs_time_beforeq(cfs_time_t t1, cfs_time_t t2)
-{
- return time_before_eq(t1, t2);
-}
-
static inline int cfs_time_after(cfs_time_t t1, cfs_time_t t2)
{
return cfs_time_before(t2, t1);
})
/*
- * helper function similar to do_gettimeofday() of Linux kernel
- */
-static inline void cfs_fs_timeval(struct timeval *tv)
-{
- cfs_fs_time_t time;
-
- cfs_fs_time_current(&time);
- cfs_fs_time_usec(&time, tv);
-}
-
-/*
* return valid time-out based on user supplied one. Currently we only check
* that time-out is not shorted than allowed.
*/