public void showNotificationsToFile(FileWriter f) throws IOException {

        for (TimedPosts post : notifications) {
            long elapsedTimeInSec = (endTime - post.getTime()) / 1000000000;
            endTime += 1000000000;
            if (elapsedTimeInSec < 60) {
                int elapsedTime = (int) elapsedTimeInSec;
                f.write(post.getPost() + "(" + elapsedTime
                        + " seconds ago)\n");
            } else {
                int elapsedTime = (int) (elapsedTimeInSec / 60);
                f.write(post.getPost() + "(" + elapsedTime
                        + " minutes ago)\n");
            }
        }
    }