diff options
author | Kostis Sagonas <[email protected]> | 2010-02-13 10:14:46 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-02-16 13:24:55 +0100 |
commit | a8bf1fe3b9f5f69354403231a3c47489d9015977 (patch) | |
tree | 973fc61192b0cad0ab3ff723d01d4653d779e8b5 /lib/percept/src/percept_db.erl | |
parent | f2592e6ef6bd6179d45884794d722e8cb551d1aa (diff) | |
download | otp-a8bf1fe3b9f5f69354403231a3c47489d9015977.tar.gz otp-a8bf1fe3b9f5f69354403231a3c47489d9015977.tar.bz2 otp-a8bf1fe3b9f5f69354403231a3c47489d9015977.zip |
percept: Clean up as suggested by tidier
Diffstat (limited to 'lib/percept/src/percept_db.erl')
-rw-r--r-- | lib/percept/src/percept_db.erl | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/lib/percept/src/percept_db.erl b/lib/percept/src/percept_db.erl index df29381c57..0d66a6a9f6 100644 --- a/lib/percept/src/percept_db.erl +++ b/lib/percept/src/percept_db.erl @@ -392,23 +392,14 @@ consolidate_runnability_loop(Key) -> consolidate_runnability_loop(ets:next(pdb_activity, Key)). list_all_ts() -> - ATs = [ Act#activity.timestamp || - Act <- select_query({activity, []})], - STs = [ Act#activity.timestamp || - Act <- select_query({scheduler, []})], + ATs = [Act#activity.timestamp || Act <- select_query({activity, []})], + STs = [Act#activity.timestamp || Act <- select_query({scheduler, []})], ITs = lists:flatten([ [I#information.start, I#information.stop] || I <- select_query({information, all})]), - % Filter out all undefined (non ts) - TsList = lists:filter( - fun(Element) -> - case Element of - {_,_,_} -> true; - _ -> false - end - end, ATs ++ STs ++ ITs), - TsList. + %% Filter out all undefined (non ts) + [Elem || Elem = {_,_,_} <- ATs ++ STs ++ ITs]. %% get_runnable_count(Type, State) -> RunnableCount %% In: |