# 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.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.

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

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

proc 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 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?"} }
    }
}

