File: obsolete.tcl

package info (click to toggle)
scotty 2.1.9-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 9,984 kB
  • ctags: 4,313
  • sloc: ansic: 35,946; sh: 12,591; tcl: 8,122; yacc: 2,442; makefile: 898; lex: 370
file content (37 lines) | stat: -rw-r--r-- 964 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# 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?"} }
    }
}