-/* -*- 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) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
/*
#include <sys/ioctl.h>
#include <fcntl.h>
#include <errno.h>
+#include <libcfs/libcfs.h>
#include "lustre/lustre_user.h"
#include "lp_utils.h"
MPI_Barrier(MPI_COMM_WORLD);
if (verbose > 0 && rank == 0) {
gettimeofday(&t2, NULL);
- elapsed = (t2.tv_sec + ((float)t2.tv_usec/1000000))
- - (t1.tv_sec + ((float)t1.tv_usec/1000000));
+
+ elapsed = t2.tv_sec - t1.tv_sec +
+ (float)(t2.tv_usec-t1.tv_usec)/1000000;
if (elapsed >= 60) {
printf("%s:\tFinished %-15s(%.2f min)\n",
timestamp(), str, elapsed / 60);
} else {
printf("%s:\tFinished %-15s(%.3f sec)\n",
- timestamp(), str, elapsed);
+ timestamp(), str, elapsed);
}
fflush(stdout);