1*3c70878eSjoerg.\" $NetBSD: ftime.3,v 1.15 2010/03/22 21:55:39 joerg Exp $ 27ff744c5Smikel.\" 39f670da2Scgd.\" Copyright (c) 1980, 1991, 1993 49f670da2Scgd.\" The Regents of the University of California. All rights reserved. 59f670da2Scgd.\" 69f670da2Scgd.\" Redistribution and use in source and binary forms, with or without 79f670da2Scgd.\" modification, are permitted provided that the following conditions 89f670da2Scgd.\" are met: 99f670da2Scgd.\" 1. Redistributions of source code must retain the above copyright 109f670da2Scgd.\" notice, this list of conditions and the following disclaimer. 119f670da2Scgd.\" 2. Redistributions in binary form must reproduce the above copyright 129f670da2Scgd.\" notice, this list of conditions and the following disclaimer in the 139f670da2Scgd.\" documentation and/or other materials provided with the distribution. 14eb7c1594Sagc.\" 3. Neither the name of the University nor the names of its contributors 159f670da2Scgd.\" may be used to endorse or promote products derived from this software 169f670da2Scgd.\" without specific prior written permission. 179f670da2Scgd.\" 189f670da2Scgd.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 199f670da2Scgd.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 209f670da2Scgd.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 219f670da2Scgd.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 229f670da2Scgd.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 239f670da2Scgd.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 249f670da2Scgd.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 259f670da2Scgd.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 269f670da2Scgd.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 279f670da2Scgd.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 289f670da2Scgd.\" SUCH DAMAGE. 299f670da2Scgd.\" 307ff744c5Smikel.\" @(#)ftime.3 8.1 (Berkeley) 6/4/93 319f670da2Scgd.\" 329f670da2Scgd.Dd June 4, 1993 339f670da2Scgd.Dt FTIME 3 3438c96853Sgarbled.Os 359f670da2Scgd.Sh NAME 369f670da2Scgd.Nm ftime 379f670da2Scgd.Nd get date and time 38312aca53Sperry.Sh LIBRARY 39312aca53Sperry.Lb libcompat 409f670da2Scgd.Sh SYNOPSIS 41472351e1Swiz.In sys/types.h 42472351e1Swiz.In sys/timeb.h 43dde1c1a0Spk.Ft int 449f670da2Scgd.Fn ftime "struct timeb *tp" 459f670da2Scgd.Sh DESCRIPTION 469f670da2Scgd.Bf -symbolic 47edcbc4e6SjtcThis interface is obsoleted by 48edcbc4e6Sjtc.Xr gettimeofday 2 . 499f670da2ScgdIt is available from the compatibility library, libcompat. 509f670da2Scgd.Ef 519f670da2Scgd.Pp 527227af12Smycroft.Bf -symbolic 537227af12SmycroftNote: time zone information is no longer provided by this interface. 547227af12SmycroftSee 557227af12Smycroft.Xr localtime 3 567227af12Smycroftfor information on how to retrieve it. 577227af12Smycroft.Ef 587227af12Smycroft.Pp 599f670da2ScgdThe 609f670da2Scgd.Fn ftime 619f670da2Scgdroutine fills in a structure pointed to by its argument, 629f670da2Scgdas defined by 63*3c70878eSjoerg.In sys/timeb.h : 649f670da2Scgd.Bd -literal -offset indent 657227af12Smycroftstruct timeb { 669f670da2Scgd time_t time; 679f670da2Scgd unsigned short millitm; 689f670da2Scgd short timezone; 699f670da2Scgd short dstflag; 709f670da2Scgd}; 719f670da2Scgd.Ed 729f670da2Scgd.Pp 739f670da2ScgdThe structure contains the time since the epoch in seconds, 7428128e05Swizup to 1000 milliseconds of more-precise interval. 7528128e05SwizThe 767227af12Smycroft.Em timezone 777227af12Smycroftand 787227af12Smycroft.Em dstflag 797227af12Smycroftfields are provided for source compatibility, but are always zero. 809f670da2Scgd.Sh SEE ALSO 819f670da2Scgd.Xr gettimeofday 2 , 829f670da2Scgd.Xr settimeofday 2 , 837227af12Smycroft.Xr ctime 3 , 847ff744c5Smikel.Xr localtime 3 , 85f6f00e26Smsaitoh.Xr time 3 869f670da2Scgd.Sh HISTORY 879f670da2ScgdThe 887227af12Smycroft.Fn ftime 899f670da2Scgdfunction appeared in 907227af12Smycroft.Bx 4.1 . 91