There isn’t a dedicated roll function, but the function that will probably be most useful for creating your own is density. (See details in the Lang section of the help panel). There are a handful of topics here on in_thread I can see that relate to a similar question:
(There might be others)…
The sleep function works with beats, so 1 beat.
Not that I know of, you’d need to assign durations to variables yourself - eg:
(Or whatever names you want to give them obviously).
As far as external files, yes! What you are after is run_file. Libraries on the other hand, such as Ruby gems, are not officially supported - you can try referencing them in Sonic Pi code, but there’s no guarantee they will work…