Projections - window last 5 minutes

Greg mentioned in this video that we can create a projection:

fromAll() …

(get all events from the last 5 minutes forward)

Sorry if this is a newby question but how do I create this projection?

How would I write it if I wanted the last x number of events forward?

There isn't a helper for this now but each event comes with a date time on it.

I assume you want this as a query? It doesn't make much sense as a
continuous projection.

Take a look at this projection:
The idea is to use internal $stats stream as a time stream (clock) which is then used to create “window” stream.