It depends on the size of the needles and the type of yarn. With big needles, a project can be started and finished in a few hours. With smaller needles, and a complicated pattern, such as lace, it would take days.
Your question doesn’t give enough information. You cast 20 stitches, and then what do you do with them? If I were making a pot holder, or coaster, which is about the size of 20 stitches, it would take me a couple of hours.
When I am sitting out by the pool all alone, I can usually knit about one inch (20 stitches across)every 15 minutes or so. When I am in the play room with my grandson, or the dog wants me to throw his ball every two minutes, it takes a lot, lot longer.