return time in proper format for linux.
This commit is contained in:
parent
7db7922f9e
commit
f225f8fe63
@ -25,7 +25,7 @@
|
|||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: linux_misc.c,v 1.41 1998/08/05 16:44:30 bde Exp $
|
* $Id: linux_misc.c,v 1.42 1998/08/16 01:21:50 bde Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -682,6 +682,7 @@ linux_time(struct proc *p, struct linux_time_args *args)
|
|||||||
printf("Linux-emul(%d): time(*)\n", p->p_pid);
|
printf("Linux-emul(%d): time(*)\n", p->p_pid);
|
||||||
#endif
|
#endif
|
||||||
microtime(&tv);
|
microtime(&tv);
|
||||||
|
timevalsub(&tv, &boottime);
|
||||||
tm = tv.tv_sec;
|
tm = tv.tv_sec;
|
||||||
if (args->tm && (error = copyout(&tm, args->tm, sizeof(linux_time_t))))
|
if (args->tm && (error = copyout(&tm, args->tm, sizeof(linux_time_t))))
|
||||||
return error;
|
return error;
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: linux_misc.c,v 1.41 1998/08/05 16:44:30 bde Exp $
|
* $Id: linux_misc.c,v 1.42 1998/08/16 01:21:50 bde Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -682,6 +682,7 @@ linux_time(struct proc *p, struct linux_time_args *args)
|
|||||||
printf("Linux-emul(%d): time(*)\n", p->p_pid);
|
printf("Linux-emul(%d): time(*)\n", p->p_pid);
|
||||||
#endif
|
#endif
|
||||||
microtime(&tv);
|
microtime(&tv);
|
||||||
|
timevalsub(&tv, &boottime);
|
||||||
tm = tv.tv_sec;
|
tm = tv.tv_sec;
|
||||||
if (args->tm && (error = copyout(&tm, args->tm, sizeof(linux_time_t))))
|
if (args->tm && (error = copyout(&tm, args->tm, sizeof(linux_time_t))))
|
||||||
return error;
|
return error;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user