Skip to content

Instantly share code, notes, and snippets.

View oltarasenko's full-sized avatar
🏠
Working from home

oltarasenko

🏠
Working from home
  • Erlang Solutions
  • Stockholm
View GitHub Profile
@stolen
stolen / timetop.erl
Created January 18, 2018 16:08
top processes by scheduled time
-module(timetop).
-export([top/2]).
top(Duration, Count) ->
OldPrio = erlang:process_flag(priority, high),
Result = scheduled_time_top(Duration),
erlang:process_flag(priority, OldPrio),
lists:sublist(Result, Count).