Ignore:
Timestamp:
Jun 26, 2019, 5:32:42 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
39156ed
Parents:
bd87a9ad (diff), b0ab7853 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/pybin/tools.py

    rbd87a9ad r256728f  
    179179                        os.chdir(cwd)
    180180
     181def killgroup():
     182        try:
     183                os.killpg(os.getpgrp(), signal.SIGINT)
     184        except KeyboardInterrupt:
     185                pass # expected
     186        except Exception as exc:
     187                print("Unexpected exception", file=sys.stderr)
     188                print(exc, file=sys.stderr)
     189                sys.stderr.flush()
     190                sys.exit(2)
     191
    181192################################################################################
    182193#               file handling
     
    301312        self.end = time.time()
    302313        self.duration = self.end - self.start
     314
     315def timed(src, timeout):
     316        expire = time.time() + timeout
     317        i = iter(src)
     318        while True:
     319                yield i.next(max(expire - time.time(), 0))
Note: See TracChangeset for help on using the changeset viewer.