# obsolete.tcl --
#
# This file contains obsolete procedures that people really shouldn't
# be using anymore, but which are kept around for backward compatibility.
#
# Copyright (c) 1994-1996 Technical University of Braunschweig.
# Copyright (c) 1996-1997 University of Twente.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.

proc Tnm::sleep secs {
    after [expr $secs * 1000]
}

proc Tnm::nslook {arg} {
    if {[catch {netdb hosts name $arg} result]} {
	set result [netdb hosts address $arg]
    }
    return $result
}

proc Tnm::getclock {args} {
    switch [llength $args] {
	0 { return [clock seconds] }
	1 { return [clock scan [lindex $args 0]] }
	default { error {wrong # args: should be "getclock ?date?"} }
    }
}

proc Tnm::getdate {args} {
    switch [llength $args] {
	0 { return [clock format [clock seconds]] }
	1 { return [clock format [lindex $args 0]] }
	default { error {wrong # args: should be "getdate ?clock?"} }
    }
}

